Merge lp:~ricardokirkner/locolander/fix-scan-project into lp:locolander

Proposed by Ricardo Kirkner
Status: Merged
Approved by: Ricardo Kirkner
Approved revision: 31
Merged at revision: 29
Proposed branch: lp:~ricardokirkner/locolander/fix-scan-project
Merge into: lp:locolander
Prerequisite: lp:~ricardokirkner/locolander/lean-output
Diff against target: 21 lines (+7/-1)
1 file modified
locolander/locolanderweb/ (+7/-1)
To merge this branch: bzr merge lp:~ricardokirkner/locolander/fix-scan-project
Reviewer Review Type Date Requested Status
Facundo Batista Approve
Review via email:

Commit message

pass parameters explicitly to get_or_create

To post a comment you must log in.
Revision history for this message
Facundo Batista (facundo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'locolander/locolanderweb/'
--- locolander/locolanderweb/ 2013-07-20 21:07:18 +0000
+++ locolander/locolanderweb/ 2013-08-10 16:53:54 +0000
@@ -1,5 +1,6 @@
1import os1import os
2import subprocess2import subprocess
3from datetime import datetime
4from celery import task5from celery import task
@@ -49,4 +50,9 @@
49def scan_project(project):50def scan_project(project):
50 mrs = project.service.approved_requests_for_project_url(project.url)51 mrs = project.service.approved_requests_for_project_url(project.url)
51 for mr in mrs:52 for mr in mrs:
52 MergeRequest.objects.get_or_create(project=project, **mr)53 # remove tzinfo and cast to UTC because USE_TZ=False
54 # and sqlite3 doesn't support them
55 mr['date_created'] = datetime(*mr['date_created'].timetuple()[:-2])
56 MergeRequest.objects.get_or_create(
57 project=project, source=mr['source'], target=mr['target'],
58 date_created=mr['date_created'], defaults=mr)


People subscribed via source and target branches

to all changes: