Changeset - b17a8090b6d1
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 13 years ago 2013-01-25 02:33:52
marcin@python-works.com
Grafted from: 226013bac971
update repo-info shouldn't allow setting empty values NEVER !
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/db.py
Show inline comments
 
@@ -1001,13 +1001,14 @@ class Repository(Base, BaseModel):
 
        if cs_cache is None:
 
            cs_cache = self.get_changeset()
 
        if isinstance(cs_cache, BaseChangeset):
 
            cs_cache = cs_cache.__json__()
 

	
 
        if cs_cache != self.changeset_cache:
 
            last_change = cs_cache.get('date') or self.last_change
 
            _default = datetime.datetime.fromtimestamp(0)
 
            last_change = cs_cache.get('date') or self.last_change or _default
 
            log.debug('updated repo %s with new cs cache %s' % (self, cs_cache))
 
            self.updated_on = last_change
 
            self.changeset_cache = cs_cache
 
            Session().add(self)
 
            Session().commit()
 

	
0 comments (0 inline, 0 general)