fixed error if report_user not set
This commit is contained in:
parent
bd48677953
commit
a968e59cf1
@ -32,7 +32,10 @@ class LocationDataDetailView(DetailView):
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def accountmodalview(request):
|
def accountmodalview(request):
|
||||||
account = Accounting.objects.filter(reporter_uuid=Client.objects.get(report_user=request.user).uuid).first
|
try:
|
||||||
|
account = Accounting.objects.filter(reporter_uuid=Client.objects.get(report_user=request.user).uuid).first
|
||||||
|
except Client.DoesNotExist:
|
||||||
|
account = None
|
||||||
context = {
|
context = {
|
||||||
'account': account
|
'account': account
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user