Merge lp:~daker/loco-team-portal/fix.1093113 into lp:loco-team-portal

Proposed by Adnane Belmadiaf
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 584
Merged at revision: 584
Proposed branch: lp:~daker/loco-team-portal/fix.1093113
Merge into: lp:loco-team-portal
Diff against target: 13 lines (+2/-1)
1 file modified
loco_directory/events/models.py (+2/-1)
To merge this branch: bzr merge lp:~daker/loco-team-portal/fix.1093113
Reviewer Review Type Date Requested Status
LoCo Team Portal Developers Pending
Review via email: mp+141152@code.launchpad.net

Commit message

Don't add geo when there is no venue

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/events/models.py'
2--- loco_directory/events/models.py 2012-12-16 23:28:14 +0000
3+++ loco_directory/events/models.py 2012-12-22 15:20:27 +0000
4@@ -115,7 +115,8 @@
5 event.add('description').value = self.description or ''
6 event.add('location').value = "%s" % self.venue or ''
7 event.add('url').value = "http://loco.ubuntu.com%s" % self.get_absolute_url()
8- event.add('geo').value = "%s;%s" % (self.venue.latitude, self.venue.longitude)
9+ if self.venue:
10+ event.add('geo').value = "%s;%s" % (self.venue.latitude, self.venue.longitude)
11
12 def get_tz(self):
13 timezone = 'UTC'

Subscribers

People subscribed via source and target branches