Merge lp:~arvindsraj-deactivatedaccount/bantrackertwo/validate-models-corrected into lp:bantrackertwo

Proposed by Arvind S Raj
Status: Approved
Approved by: Benjamin Rubin
Approved revision: 19
Proposed branch: lp:~arvindsraj-deactivatedaccount/bantrackertwo/validate-models-corrected
Merge into: lp:bantrackertwo
Prerequisite: lp:~arvindsraj-deactivatedaccount/bantrackertwo/paranthesis-mismatch-bt-models.py
Diff against target: 21 lines (+2/-2)
1 file modified
bt/models.py (+2/-2)
To merge this branch: bzr merge lp:~arvindsraj-deactivatedaccount/bantrackertwo/validate-models-corrected
Reviewer Review Type Date Requested Status
Benjamin Rubin Approve
Review via email: mp+27327@code.launchpad.net

Description of the change

Corrected the validate models error
               changed value of related_name to ban_removed_by in class ban; line 55 of bt/models.py
               changed value of related_name to mute_removed_by in class mute; line 70 of bt/models.py

The related_name had the same values in both the classes and that's what caused the error I think. Do give a more sensible name if you feel it's needed.

To post a comment you must log in.
Revision history for this message
Benjamin Rubin (bnrubin) :
review: Approve

Unmerged revisions

19. By Arvind S Raj <arvind@dnivra>

Validate models corrected

18. By Arvind S Raj <arvind@dnivra>

paranthesis mismatch fixed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bt/models.py'
2--- bt/models.py 2010-06-11 07:49:25 +0000
3+++ bt/models.py 2010-06-11 07:49:25 +0000
4@@ -52,7 +52,7 @@
5 class Ban(Event):
6 mask = models.CharField(max_length=255)
7 removal_date = models.DateTimeField(null = True)
8- removed_by = models.ForeignKey('Operator', null = True, related_name = 'removed_by')
9+ removed_by = models.ForeignKey('Operator', null = True, related_name = 'ban_removed_by')
10 kick = models.OneToOneField('Kick', null = True)
11
12 def is_removed(self):
13@@ -67,7 +67,7 @@
14 class Mute(Event):
15 mask = models.CharField(max_length=255)
16 removal_date = models.DateTimeField(null = True)
17- removed_by = models.ForeignKey('Operator', null = True, related_name = 'removed_by')
18+ removed_by = models.ForeignKey('Operator', null = True, related_name = 'mute_removed_by')
19
20 def is_removed(self):
21 return self.removal_date != None

Subscribers

People subscribed via source and target branches

to all changes: