Merge lp:~sajoupa/turku/turku-api-fix-human-time-r53 into lp:turku/turku-api

Proposed by Laurent Sesquès
Status: Merged
Merged at revision: 58
Proposed branch: lp:~sajoupa/turku/turku-api-fix-human-time-r53
Merge into: lp:turku/turku-api
Diff against target: 12 lines (+2/-0)
1 file modified
turku_api/admin.py (+2/-0)
To merge this branch: bzr merge lp:~sajoupa/turku/turku-api-fix-human-time-r53
Reviewer Review Type Date Requested Status
Junien Fridrick Approve
Review via email: mp+325561@code.launchpad.net

Description of the change

admin.py: handle sources with no last backup date in human_time (regression in r53)

To post a comment you must log in.
Revision history for this message
Junien Fridrick (axino) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'turku_api/admin.py'
2--- turku_api/admin.py 2015-07-30 22:41:42 +0000
3+++ turku_api/admin.py 2017-06-13 12:18:22 +0000
4@@ -46,6 +46,8 @@
5
6
7 def human_time(t):
8+ if t is None:
9+ return None
10 if abs(timezone.now() - t) >= datetime.timedelta(days=1):
11 return t
12 else:

Subscribers

People subscribed via source and target branches

to all changes: