zou 0.20.27__py3-none-any.whl → 0.20.29__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.
zou/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.20.27"
1
+ __version__ = "0.20.29"
@@ -537,7 +537,7 @@ class PersonQuotaMixin(ArgsMixin):
537
537
  def get_quota_arguments(self):
538
538
  project_id = self.get_project_id()
539
539
  task_type_id = self.get_task_type_id()
540
- count_mode = self.get_text_parameter("count_mode", default="weigthed")
540
+ count_mode = self.get_text_parameter("count_mode", default="weighted")
541
541
  if count_mode not in ["weighted", "weighteddone", "feedback", "done"]:
542
542
  raise WrongParameterException(
543
543
  "count_mode must be equal to weighted, weigtheddone, feedback"
@@ -558,7 +558,7 @@ class PersonQuotaMixin(ArgsMixin):
558
558
  pass
559
559
 
560
560
  @jwt_required()
561
- def get(self, person_id, **kwargs):
561
+ def get(self, person_id, *args, **kwargs):
562
562
  user_service.check_person_is_not_bot(person_id)
563
563
  (project_id, task_type_id, feedback, weighted) = (
564
564
  self.get_quota_arguments()
@@ -568,6 +568,7 @@ class PersonQuotaMixin(ArgsMixin):
568
568
  try:
569
569
  return self.get_person_quotas(
570
570
  person_id,
571
+ *args,
571
572
  **kwargs,
572
573
  project_id=project_id,
573
574
  task_type_id=task_type_id,
@@ -626,7 +627,7 @@ class PersonMonthQuotaShotsResource(Resource, PersonQuotaMixin):
626
627
  404:
627
628
  description: Wrong date format
628
629
  """
629
- super().get(person_id, year, month)
630
+ return super().get(person_id, year, month)
630
631
 
631
632
 
632
633
  class PersonWeekQuotaShotsResource(Resource, PersonQuotaMixin):
@@ -677,7 +678,7 @@ class PersonWeekQuotaShotsResource(Resource, PersonQuotaMixin):
677
678
  404:
678
679
  description: Wrong date format
679
680
  """
680
- super().get(person_id, year, week)
681
+ return super().get(person_id, year, week)
681
682
 
682
683
 
683
684
  class PersonDayQuotaShotsResource(Resource, PersonQuotaMixin):
@@ -735,7 +736,7 @@ class PersonDayQuotaShotsResource(Resource, PersonQuotaMixin):
735
736
  404:
736
737
  description: Wrong date format
737
738
  """
738
- super().get(person_id, year, month, day)
739
+ return super().get(person_id, year, month, day)
739
740
 
740
741
 
741
742
  class TimeSpentDurationResource(Resource, ArgsMixin):
@@ -1646,7 +1646,13 @@ class ProjectPersonQuotasResource(Resource, ArgsMixin):
1646
1646
  description: Quotas statistics for shots
1647
1647
  """
1648
1648
  projects_service.get_project(project_id)
1649
- user_service.check_project_access(project_id)
1649
+ if (
1650
+ permissions.has_manager_permissions()
1651
+ or permissions.has_supervisor_permissions()
1652
+ ):
1653
+ user_service.check_project_access(project_id)
1654
+ else:
1655
+ user_service.check_person_access(person_id)
1650
1656
  args = self.get_args(
1651
1657
  [
1652
1658
  ("count_mode", "weighted", False, str),
@@ -1508,7 +1508,6 @@ def get_day_quota_shots(
1508
1508
  person and day.
1509
1509
  """
1510
1510
  start, end = date_helpers.get_day_interval(year, month, day)
1511
- # start, end = _get_timezoned_interval(start, end)
1512
1511
  if weighted:
1513
1512
  return get_weighted_quota_shots_between(
1514
1513
  person_id,
@@ -419,7 +419,7 @@ def check_belong_to_project(project_id):
419
419
 
420
420
  def has_project_access(project_id):
421
421
  """
422
- Return true if current user is a manager or has a task assigned for this
422
+ Return true if current user is an admin or has a task assigned for this
423
423
  project.
424
424
  """
425
425
  return permissions.has_admin_permissions() or check_belong_to_project(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zou
3
- Version: 0.20.27
3
+ Version: 0.20.29
4
4
  Summary: API to store and manage the data of your animation production
5
5
  Home-page: https://zou.cg-wire.com
6
6
  Author: CG Wire
@@ -1,4 +1,4 @@
1
- zou/__init__.py,sha256=1L1Y7Qkgnb6-S9RmspxApayJ9wu581SZ3OJj57xlk4Y,24
1
+ zou/__init__.py,sha256=FXJbTQH8wVKM0HLCjwxtNaN0NBc_smTXE3zDftv1zHI,24
2
2
  zou/cli.py,sha256=HuYi2Ma7SP2SD7C9d9dwpZ49BHpytKIoyJP_su9JwZY,18755
3
3
  zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
4
4
  zou/event_stream.py,sha256=EpohqFJwWL0zs-Ic_W5dX5_XSDeCrqHQPL5Re39OnQ0,6382
@@ -87,7 +87,7 @@ zou/app/blueprints/index/resources.py,sha256=Z2N8fRffv4rkhazUe1_2x6I7-A01rCkCnBy
87
87
  zou/app/blueprints/news/__init__.py,sha256=HxBXjC15dVbotNAZ0CLf02iwUjxJr20kgf8_kT_9nwM,505
88
88
  zou/app/blueprints/news/resources.py,sha256=HdLq2NgfKyN2d3hIATBhH3dlk4c50I4dhhvEhhB_NY4,7334
89
89
  zou/app/blueprints/persons/__init__.py,sha256=0cnHHw3K_8OEMm0qOi3wKVomSAg9IJSnVjAXabMeHks,3893
90
- zou/app/blueprints/persons/resources.py,sha256=HSkNnZX-JI_mVkVgoArPGylJAJzuSW_4Gz53VbiQczY,42133
90
+ zou/app/blueprints/persons/resources.py,sha256=YS5ogqi3xbA0fKZp4c-FH4YWsf3HdBKWy4CKAF5BcY4,42184
91
91
  zou/app/blueprints/playlists/__init__.py,sha256=vuEk1F3hFHsmuKWhdepMoLyOzmNKDn1YrjjfcaIz0lQ,1596
92
92
  zou/app/blueprints/playlists/resources.py,sha256=alRlMHypUFErXLsEYxpFK84cdjFJ3YWwamZtW0KcwLY,17211
93
93
  zou/app/blueprints/previews/__init__.py,sha256=ihC6OQ9AUjnZ2JeMnjRh_tKGO0UmAjOwhZnOivc3BnQ,4460
@@ -97,7 +97,7 @@ zou/app/blueprints/projects/resources.py,sha256=1WBS2FyaY1RSA_T-BdPnc8X9myjTJ127
97
97
  zou/app/blueprints/search/__init__.py,sha256=QCjQIY_85l_orhdEiqav_GifjReuwsjZggN3V0GeUVY,356
98
98
  zou/app/blueprints/search/resources.py,sha256=_QgRlUuxCPgY-ip5r2lGFtXNcGSE579JsCSrVf8ajVU,3093
99
99
  zou/app/blueprints/shots/__init__.py,sha256=EcG9qmAchlucqg1M6-RqWGfuKpa5Kq6RgyLZNSsjUr4,4225
100
- zou/app/blueprints/shots/resources.py,sha256=WOWvYOEVxv3mu1PKTFg6lGoTfM_UQ5n-iJTUFuZKMh8,52162
100
+ zou/app/blueprints/shots/resources.py,sha256=Uv8zXKK1e23U0Sw11qjnJT7-JrirDPjS8usQKMHzix0,52366
101
101
  zou/app/blueprints/source/__init__.py,sha256=H7K-4TDs4pc5EJvcYTYMJBHesxyqsE5-xq7J8ckOS2g,6093
102
102
  zou/app/blueprints/source/kitsu.py,sha256=4lWdqxaKDzwx-5POAIHIgZ6ODbDMOOVRxaSb_FOLcCk,5012
103
103
  zou/app/blueprints/source/otio.py,sha256=nTXQEauFinPv2QBXziJW83rSrB_qzIbkFQ_qgxbJynA,13419
@@ -206,14 +206,14 @@ zou/app/services/preview_files_service.py,sha256=Yk-vwzHuKTzNkEZfl9DhQRdDuRU006u
206
206
  zou/app/services/projects_service.py,sha256=aIbYaFomy7OX2Pxvkf9w5qauDvkjuc9ummSGNYIpQMY,21249
207
207
  zou/app/services/scenes_service.py,sha256=iXN19HU4njPF5VtZXuUrVJ-W23ZQuQNPC3ADXltbWtU,992
208
208
  zou/app/services/schedule_service.py,sha256=E99HKYsXgnK2sw58fw-NNHXWBgVJiA60upztjkNSCaM,6989
209
- zou/app/services/shots_service.py,sha256=NxIK_kluFR284jufZt76xvHxsS-BQBOG6IW5tpz4O68,54802
209
+ zou/app/services/shots_service.py,sha256=MfBvw0hhVwi_KSQVnM-V4O3LnNkJB2imJWF6n9J6xfc,54747
210
210
  zou/app/services/stats_service.py,sha256=e9h090eZWADtzXycy1WOup_jlxGwQojrr1y_PDcVatc,13156
211
211
  zou/app/services/status_automations_service.py,sha256=tVio7Sj7inhvKS4UOyRhcdpwr_KNP96hT1o0X7XcGF4,715
212
212
  zou/app/services/sync_service.py,sha256=iWxx1kOGEXympHmSBBQWtDZWNtumdxp8kppee0OefMo,41811
213
213
  zou/app/services/tasks_service.py,sha256=6ZFq4DhJ9HDgWT3CcikUWWImMNuHko1Bz_ARKPfeoEw,69775
214
214
  zou/app/services/telemetry_services.py,sha256=xQm1h1t_JxSFW59zQGf4NuNdUi1UfMa_6pQ-ytRbmGA,1029
215
215
  zou/app/services/time_spents_service.py,sha256=H9X-60s6oqtY9rtU-K2jKwUSljfkdGlf_9wMr3iVfIA,15158
216
- zou/app/services/user_service.py,sha256=0slEsN8HSsw7KILgo6uopv81YJvQLvDljnCrHq4aqsc,51354
216
+ zou/app/services/user_service.py,sha256=-ST4zUm2rbdXgdw2xzVJaYEA-LAsZvInRjDvpCC8GJA,51353
217
217
  zou/app/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
218
218
  zou/app/stores/auth_tokens_store.py,sha256=-qOJPybLHvnMOq3PWk073OW9HJwOHGhFLZeOIlX1UVw,1290
219
219
  zou/app/stores/file_store.py,sha256=yLQDM6mNbj9oe0vsWdBqun7D8Dw-eSjD1yHCCftX0OI,4045
@@ -420,9 +420,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
420
420
  zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
421
421
  zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
422
422
  zou/utils/movie.py,sha256=d67fIL9dVBKt-E_qCGXRbNNdbJaJR5sHvZeX3hf8ldE,16559
423
- zou-0.20.27.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
424
- zou-0.20.27.dist-info/METADATA,sha256=ISW_tDPpL2079v7M9rPKmwdhnpph_pmU5k3H6HG1sUs,6695
425
- zou-0.20.27.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
426
- zou-0.20.27.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
427
- zou-0.20.27.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
428
- zou-0.20.27.dist-info/RECORD,,
423
+ zou-0.20.29.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
424
+ zou-0.20.29.dist-info/METADATA,sha256=sPFaTO116RHR00Ktge7uSIJ2JvGVYgxhHWkuaUg6Gfo,6695
425
+ zou-0.20.29.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
426
+ zou-0.20.29.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
427
+ zou-0.20.29.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
428
+ zou-0.20.29.dist-info/RECORD,,
File without changes