Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
fix issue #42
Browse files Browse the repository at this point in the history
  • Loading branch information
deathowl committed Nov 10, 2015
1 parent a27e3c2 commit fee0696
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openduty/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def new(request):
def save(request):
# Update service fields
try:
service = Service.objects.get(id = request.POST['id'])
service_id = request.POST.get("id")
if service_id != '0':
service = Service.objects.get(id=service_id)
else:
service = Service()
except Service.DoesNotExist:
service = Service()

Expand Down

0 comments on commit fee0696

Please sign in to comment.