mirror of
https://github.com/RoboSats/robosats.git
synced 2024-09-11 14:05:51 +03:00
Fix error when query parameters not passed (#239)
if no parameters are passed to `/api/book` then just return orders of ALL currency of ANY type. Currently, if no query parameters are passed, then the API returns 500 status code
This commit is contained in:
parent
cb6475a3f4
commit
215e04f75e
@ -822,8 +822,8 @@ class BookView(ListAPIView):
|
||||
queryset = Order.objects.filter(status=Order.Status.PUB)
|
||||
|
||||
def get(self, request, format=None):
|
||||
currency = request.GET.get("currency")
|
||||
type = request.GET.get("type")
|
||||
currency = request.GET.get("currency", 0)
|
||||
type = request.GET.get("type", 2)
|
||||
|
||||
queryset = Order.objects.filter(status=Order.Status.PUB)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user