mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00: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