django-restit 4.2.125__py3-none-any.whl → 4.2.126__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.125
3
+ Version: 4.2.126
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -376,7 +376,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
376
376
  rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
377
377
  rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
378
378
  rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
379
- rest/__init__.py,sha256=NBdgyzD7Sr_EusbqnuFbRRRqTOZ83u4uzw9o1hGOOnw,122
379
+ rest/__init__.py,sha256=-6k0CrKjpSei0ipDWJ6c1dWaNPzk0AiB0VnaIKHwKP0,122
380
380
  rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
381
381
  rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
382
382
  rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
@@ -409,7 +409,7 @@ rest/middleware/request.py,sha256=JchRNy5L-bGd-7h-KFYekGRvREe2eCkZXKOYqIkP2hI,41
409
409
  rest/middleware/session.py,sha256=zHSoQpIzRLmpqr_JvW406wzpvU3W3gDbm5JhtzLAMlE,10240
410
410
  rest/middleware/session_store.py,sha256=1nSdeXK8PyuYgGgIufqrS6j6QpIrQ7zbMNT0ol75e6U,1901
411
411
  rest/models/__init__.py,sha256=M8pvFDq-WCF-QcM58X7pMufYYe0aaQ3U0PwGe9TKbbY,130
412
- rest/models/base.py,sha256=fBW62KkwUF7j9Es4B_UzjfgbIRIUAbvN0_-16YjXJ8o,70917
412
+ rest/models/base.py,sha256=dLgJcxDzSJDn8wsdZJaH7BkJDYTgkhnJX7-asolO6TA,70968
413
413
  rest/models/cacher.py,sha256=eKz8TINVhWEqKhJGMsRkKZTtBUIv5rN3NHbZwOC56Uk,578
414
414
  rest/models/metadata.py,sha256=1nQ7CYo9bJHoaXE_hVNaj1-Y7yqhHlf2ZlaD1IfTzic,12904
415
415
  rest/net.py,sha256=LcB2QV6VNRtsSdmiQvYZgwQUDwOPMn_VBdRiZ6OpI-I,2974
@@ -511,7 +511,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
511
511
  ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
512
512
  ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
513
513
  ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
514
- django_restit-4.2.125.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
515
- django_restit-4.2.125.dist-info/METADATA,sha256=1MGxqma8EG_Bsb6xAzGNoEcvCsFIOwCbnkUjFh3SNQY,7663
516
- django_restit-4.2.125.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
517
- django_restit-4.2.125.dist-info/RECORD,,
514
+ django_restit-4.2.126.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
515
+ django_restit-4.2.126.dist-info/METADATA,sha256=nItMuLI89BRziLGQnDQD1YT1ppInoVfIIIrugVFRe60,7663
516
+ django_restit-4.2.126.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
517
+ django_restit-4.2.126.dist-info/RECORD,,
rest/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  from .uberdict import UberDict # noqa: F401
2
2
  from .settings_helper import settings # noqa: F401
3
3
 
4
- __version__ = "4.2.125"
4
+ __version__ = "4.2.126"
rest/models/base.py CHANGED
@@ -362,7 +362,7 @@ class RestModel(object):
362
362
  if hasattr(obj, "on_rest_can_get"):
363
363
  if not obj.on_rest_can_get(self.getActiveRequest()):
364
364
  return None
365
- return None
365
+ return obj
366
366
 
367
367
  @classmethod
368
368
  def get_db_mapping(cls, name):
@@ -742,6 +742,8 @@ class RestModel(object):
742
742
  pass
743
743
 
744
744
  def on_rest_can_get(self, request):
745
+ if request is None:
746
+ return True
745
747
  perms = getattr(self.RestMeta, "VIEW_PERMS", None)
746
748
  if perms:
747
749
  if "owner" in perms and self.checkIsOwner(request.member):