make the request user query unique (bug 587226)
This commit is contained in:
Родитель
7ecaa97920
Коммит
aeb975bfe6
|
@ -10,7 +10,7 @@
|
|||
<p>
|
||||
{{ form.errors['slug']|safe }}
|
||||
{{ form.slug.label|safe }}
|
||||
{{ url('collections.user', user.get_profile().nickname)|absolutify -}}
|
||||
{{ url('collections.user', amo_user.nickname)|absolutify -}}
|
||||
{{ form.slug|safe }}
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -41,7 +41,8 @@ def create_password(algorithm, raw_password):
|
|||
class UserManager(amo.models.ManagerBase):
|
||||
|
||||
def request_user(self):
|
||||
return self.transform(UserProfile.request_user_transformer)
|
||||
return (self.extra(select={'request': 1})
|
||||
.transform(UserProfile.request_user_transformer))
|
||||
|
||||
|
||||
class UserProfile(amo.models.ModelBase):
|
||||
|
|
Загрузка…
Ссылка в новой задаче