Show More
@@ -2231,8 +2231,13 b' class Repository(Base, BaseModel):' | |||
|
2231 | 2231 | |
|
2232 | 2232 | # check if we have maybe already latest cached revision |
|
2233 | 2233 | if is_outdated(cs_cache) or not self.changeset_cache: |
|
2234 |
_default = datetime.datetime. |
|
|
2234 | _default = datetime.datetime.utcnow() | |
|
2235 | 2235 | last_change = cs_cache.get('date') or _default |
|
2236 | if self.updated_on and self.updated_on > last_change: | |
|
2237 | # we check if last update is newer than the new value | |
|
2238 | # if yes, we use the current timestamp instead. Imagine you get | |
|
2239 | # old commit pushed 1y ago, we'd set last update 1y to ago. | |
|
2240 | last_change = _default | |
|
2236 | 2241 | log.debug('updated repo %s with new cs cache %s', |
|
2237 | 2242 | self.repo_name, cs_cache) |
|
2238 | 2243 | self.updated_on = last_change |
General Comments 0
You need to be logged in to leave comments.
Login now