Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
chris
repanier
Commits
8f8b180c
Commit
8f8b180c
authored
Nov 04, 2015
by
Patrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RelatedObjectDoesNotExist: User_Deferred_date_joined_email_first_name
parent
50b31b51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
repanier/views.py
repanier/views.py
+4
-8
No files found.
repanier/views.py
View file @
8f8b180c
...
...
@@ -185,7 +185,7 @@ def send_mail_to_coordinators(request):
def
send_mail_to_all_members
(
request
):
if
request
.
user
.
is_staff
:
raise
Http404
is_coordinator
=
request
.
user
.
is_superuser
or
Staff
.
objects
.
filter
(
is_coordinator
=
request
.
user
.
is_superuser
or
request
.
user
.
is_staff
or
Staff
.
objects
.
filter
(
customer_responsible_id
=
request
.
user
.
customer
.
id
,
is_coordinator
=
True
,
is_active
=
True
).
order_by
().
first
()
is
not
None
if
request
.
method
==
'POST'
:
...
...
@@ -234,15 +234,11 @@ def who_is_who(request):
customer_list
=
Customer
.
objects
.
filter
(
may_order
=
True
,
represent_this_buyinggroup
=
False
).
order_by
(
"short_basket_name"
)
if
q
is
not
None
:
customer_list
=
customer_list
.
filter
(
Q
(
long_basket_name__icontains
=
q
)
|
Q
(
city__icontains
=
q
))
staff
=
request
.
user
.
is_superuser
or
Staff
.
objects
.
filter
(
is_coordinator
=
request
.
user
.
is_superuser
or
request
.
user
.
is_staff
or
Staff
.
objects
.
filter
(
customer_responsible_id
=
request
.
user
.
customer
.
id
,
is_coordinator
=
True
,
is_active
=
True
).
order_by
().
first
()
if
staff
is
not
None
:
coordinator
=
True
else
:
coordinator
=
False
).
order_by
().
first
()
is
not
None
return
render_response
(
request
,
"repanier/who_is_who.html"
,
{
'customer_list'
:
customer_list
,
'coordinator'
:
coordinator
,
'q'
:
q
}
request
,
"repanier/who_is_who.html"
,
{
'customer_list'
:
customer_list
,
'coordinator'
:
is_
coordinator
,
'q'
:
q
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment