django-restit 4.2.89__py3-none-any.whl → 4.2.90__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
account/rpc/group.py CHANGED
@@ -121,7 +121,7 @@ def rest_on_group_stats(request):
121
121
  if not group:
122
122
  return rv.restPermissionDenied(request)
123
123
  if not request.member.hasPerm(["view_all_groups", "manage_groups"]):
124
- if not request.member.hasGroupPerm(group, ["reports"]):
124
+ if not request.member.hasGroupPerm(group, ["reports", "reporting"]):
125
125
  return rv.restPermissionDenied(request)
126
126
  qset = group.getAllChildren(True, True, True).filter(is_active=True)
127
127
  out = rh.countOccurences(qset, "kind")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.89
3
+ Version: 4.2.90
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -42,7 +42,7 @@ account/periodic.py,sha256=-u0n-7QTJgDOkasGhBAPwHAwjpqWGA-MZLEFkVTqCGU,874
42
42
  account/rpc/__init__.py,sha256=SGF0M_-H0dKh3b1apSX29BotNWAvITYccGQVC0MIjL8,336
43
43
  account/rpc/auth.py,sha256=p62tyihWvSY2zn7eaVxKcCG9qLnnZBIkwdRH81sS5_Y,16615
44
44
  account/rpc/device.py,sha256=mB14a6qvJIBnCa9ivLhPXwEt5Gk2foyqsKBtZxC506k,3070
45
- account/rpc/group.py,sha256=Bs9O69xHXtFT-fykPXPzRtLI9C0Oj967N2hJklv3wZ4,4916
45
+ account/rpc/group.py,sha256=riymUK6ttv8G6SG6K-v7UCvM40WQy3HaGSeF_sEiaU0,4929
46
46
  account/rpc/member.py,sha256=VNRSD38mmTUCbq3cCSy3qRyquzeVEwW_8zzrtS0-vAA,1817
47
47
  account/rpc/notify.py,sha256=Q2YWejP36egeF060Hih5uX4Psv_B8NWlLLPi7iDYlIw,3344
48
48
  account/rpc/oauth.py,sha256=ISLVsR5HvKALANokaOFRvF4FTRxWtXPvVnZAYANKxpo,2864
@@ -406,7 +406,7 @@ rest/middleware/session_store.py,sha256=1nSdeXK8PyuYgGgIufqrS6j6QpIrQ7zbMNT0ol75
406
406
  rest/models/__init__.py,sha256=M8pvFDq-WCF-QcM58X7pMufYYe0aaQ3U0PwGe9TKbbY,130
407
407
  rest/models/base.py,sha256=bPcTeCX7KvhkcVMKEyLmu9eYc7ccJGkIP1n3cctJPVE,69675
408
408
  rest/models/cacher.py,sha256=eKz8TINVhWEqKhJGMsRkKZTtBUIv5rN3NHbZwOC56Uk,578
409
- rest/models/metadata.py,sha256=65GvfFbc26_7wJz8qEAzU7fEOZWVz0ttO5j5m_gs4hk,12860
409
+ rest/models/metadata.py,sha256=1nQ7CYo9bJHoaXE_hVNaj1-Y7yqhHlf2ZlaD1IfTzic,12904
410
410
  rest/net.py,sha256=LcB2QV6VNRtsSdmiQvYZgwQUDwOPMn_VBdRiZ6OpI-I,2974
411
411
  rest/regexes.yaml,sha256=VoGb4E-P_K9f82Yzcpltgzekpt9usRtwu9PYlo46nUw,149463
412
412
  rest/requestex.py,sha256=N56056vV3zWkAP-QrYsCu7SdpPzE5kLuPoxGIuZAKt0,16127
@@ -506,7 +506,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
506
506
  ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
507
507
  ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
508
508
  ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
509
- django_restit-4.2.89.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
510
- django_restit-4.2.89.dist-info/METADATA,sha256=oUQ-GYEwBbLeQLyb9if2FDKwacmHQN7cLrFtJFsdD80,7645
511
- django_restit-4.2.89.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
512
- django_restit-4.2.89.dist-info/RECORD,,
509
+ django_restit-4.2.90.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
510
+ django_restit-4.2.90.dist-info/METADATA,sha256=NgUxbFxdTPM54mt7gxCFK77X4SIu0_2TDlioDkYvgC8,7645
511
+ django_restit-4.2.90.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
512
+ django_restit-4.2.90.dist-info/RECORD,,
rest/models/metadata.py CHANGED
@@ -115,7 +115,7 @@ class MetaDataModel(object):
115
115
  if not isinstance(values, dict):
116
116
  raise Exception("invalid metadata: {}".format(values))
117
117
 
118
- for key, value in list(values.items()):
118
+ for key, value in values.items():
119
119
  cat = None
120
120
  if "." in key:
121
121
  cat, key = key.split('.')
@@ -230,15 +230,17 @@ class MetaDataModel(object):
230
230
  request = rh.getActiveRequest()
231
231
  self.__initFieldProps()
232
232
 
233
+ if "." in key:
234
+ category, key = key.split('.')
235
+
233
236
  if isinstance(value, dict):
234
- return self.setProperties(value, key)
237
+ if category is None:
238
+ return self.setProperties(value, key)
235
239
  username = "root"
236
240
  if request and request.member:
237
241
  username = request.member.username
238
242
  prop = None
239
243
 
240
- if "." in key:
241
- category, key = key.split('.')
242
244
  if category:
243
245
  # delete any keys with this category name
244
246
  full_key = "{}.{}".format(category, key)