diff options
| author | Christopher Long <indirecthit@gmail.com> | 2006-08-25 10:50:46 +0000 |
|---|---|---|
| committer | Christopher Long <indirecthit@gmail.com> | 2006-08-25 10:50:46 +0000 |
| commit | bd64483da63c3790446107b3f7151768dc1f6e65 (patch) | |
| tree | a54577986932f7437a6cb95e87228a5a2b1ba53c | |
| parent | 5d37e5cd4c42e5dd831f927fd94329cb5c613d83 (diff) | |
[per-object-permissions] Removed a debug print statement and changed an incorrect order of a format string
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/auth/models.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index ee73cfe11d..cf5580c09c 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -424,7 +424,6 @@ class User(models.Model): #pdb.set_trace() cursor.execute(sql, [app_label, ContentType.objects.get_for_model(User).id, self.id, False]) count = int(cursor.fetchone()[0]) - print "User. App: %s, Count: %d" % (app_label, count) if count>0: return True return self.has_module_group_row_level_perms(app_label) @@ -454,9 +453,8 @@ class User(models.Model): backend.quote_name('model_ct_id'), backend.quote_name('id'), backend.quote_name('app_label'), backend.quote_name('negative'), backend.quote_name('owner_ct_id')) - cursor.execute(sql, [app_label, self.id, False, ContentType.objects.get_for_model(Group).id]) + cursor.execute(sql, [self.id, app_label, False, ContentType.objects.get_for_model(Group).id]) count = int(cursor.fetchone()[0]) - print "Group. App: %s, Count: %d" % (app_label, count) return (count>0) |
