Skip to content
Snippets Groups Projects
Commit 1b707b92 authored by Christian Dresen's avatar Christian Dresen
Browse files

[WarpFood] Fixed Sheet

parent ba837ffa
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ from datetime import datetime, timedelta ...@@ -17,7 +17,7 @@ from datetime import datetime, timedelta
def index(request): def index(request):
form = FoodSheetForm() form = FoodSheetForm()
if request.user.is_superuser: if request.user.is_authenticated():
if request.method == 'POST': if request.method == 'POST':
form = FoodSheetForm(request.POST) form = FoodSheetForm(request.POST)
if form.is_valid(): if form.is_valid():
...@@ -33,7 +33,7 @@ def index(request): ...@@ -33,7 +33,7 @@ def index(request):
def edit_sheet(request, sheet_id=0): def edit_sheet(request, sheet_id=0):
if sheet_id != 0 and request.user.is_superuser: if sheet_id != 0 and request.user.is_superuser():
try: try:
sheet = FoodSheet.objects.get(id=sheet_id) sheet = FoodSheet.objects.get(id=sheet_id)
except Exception as e: except Exception as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment