forked from data.coop/membersystem
Don't Error 500 when using other member's Order PK etc
This commit is contained in:
parent
1070e93885
commit
a93a879f50
|
@ -102,7 +102,7 @@ def success(request: HttpRequest, order_id: int) -> HttpResponse:
|
|||
quickly as possible.
|
||||
"""
|
||||
user = request.user # People just need to login to pay something, not necessarily be a member
|
||||
order = models.Order.objects.get(pk=order_id, member=user)
|
||||
order = get_object_or_404(models.Order, pk=order_id, member=user)
|
||||
|
||||
context = {
|
||||
"order": order,
|
||||
|
|
Loading…
Reference in a new issue