forget pk queru

pull/5/head
Mustafa Yontar 4 years ago
parent c3d64a6232
commit 1316c86189
  1. 2
      restapi/resource.py

@ -112,7 +112,7 @@ class Resource:
data = self.mongo_qs data = self.mongo_qs
count = data.count() count = data.count()
if pk: if pk:
json_data = self.parse_fields(self.model) json_data = self.parse_fields(self.mongo_qs.get(**{self.as_pk:pk}),self.model)
else: else:
data = data[self.offset:self.limit + self.offset] data = data[self.offset:self.limit + self.offset]
json_data = [] json_data = []

Loading…
Cancel
Save