Revision 8f66553c
Fixed problems with previous fix
crm/robocrm/views.py | ||
---|---|---|
1 | 1 |
# Create your views here. |
2 | 2 |
from django.http import HttpResponse, Http404 |
3 |
from django.core.exceptions import PermissionDenied, DoesNotExist |
|
3 |
from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
|
|
4 | 4 |
from django.contrib.auth import authenticate, login |
5 | 5 |
from robocrm.models import * |
6 | 6 |
|
... | ... | |
52 | 52 |
|
53 | 53 |
try: |
54 | 54 |
robouser = RoboUser.objects.get(rfid__iexact=user_id) |
55 |
except DoesNotExist: |
|
55 |
except ObjectDoesNotExist:
|
|
56 | 56 |
robouser = None |
57 | 57 |
|
58 |
try: |
|
59 |
machine = Machine.objects.get(id__exact=machine_id) |
|
60 |
except DoesNotExist: |
|
61 |
machine = None |
|
58 |
machine = Machine.objects.get(id__exact=machine_id) |
|
62 | 59 |
|
63 | 60 |
ev = Event(type='card', |
64 | 61 |
tstart=tstart, |
Also available in: Unified diff