zou 0.19.60__py3-none-any.whl → 0.19.61__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.19.60"
1
+ __version__ = "0.19.61"
@@ -283,8 +283,8 @@ class ConfigResource(Resource):
283
283
  responses:
284
284
  200:
285
285
  description: Configuration object including self-hosted status,
286
- Crisp token, indexer configuration, SAML status, and dark theme
287
- status
286
+ Crisp token, indexer configuration, SAML status, and dark
287
+ theme status.
288
288
  """
289
289
  organisation = persons_service.get_organisation()
290
290
  conf = {
@@ -783,7 +783,6 @@ class FilterGroupResource(Resource, ArgsMixin):
783
783
  )
784
784
 
785
785
  data = self.clear_empty_fields(data)
786
- print("data", data)
787
786
  user_filter = user_service.update_filter_group(filter_group_id, data)
788
787
  return user_filter, 200
789
788
 
zou/app/config.py CHANGED
@@ -81,7 +81,7 @@ MAIL_SERVER = os.getenv("MAIL_SERVER", "localhost")
81
81
  MAIL_PORT = os.getenv("MAIL_PORT", 25)
82
82
  MAIL_USERNAME = os.getenv("MAIL_USERNAME", "")
83
83
  MAIL_PASSWORD = os.getenv("MAIL_PASSWORD", "")
84
- MAIL_DEBUG = int(os.getenv("MAIL_DEBUG", "0"))
84
+ MAIL_DEBUG = envtobool("MAIL_DEBUG", False)
85
85
  MAIL_DEBUG_BODY = envtobool("MAIL_DEBUG_BODY", False)
86
86
  MAIL_USE_TLS = envtobool("MAIL_USE_TLS", False)
87
87
  MAIL_USE_SSL = envtobool("MAIL_USE_SSL", False)
@@ -895,8 +895,8 @@ def get_user_filters(current_user_id):
895
895
  for search_filter in filters:
896
896
  department_id = search_filter.department_id
897
897
  is_in_departments = (
898
- department_id is not None and \
899
- str(department_id) in current_user["departments"]
898
+ department_id is not None
899
+ and str(department_id) in current_user["departments"]
900
900
  )
901
901
 
902
902
  if department_id is None or is_manager or is_in_departments:
@@ -996,15 +996,17 @@ def update_filter(search_filter_id, data):
996
996
  f"No department found with id: {department_id}"
997
997
  )
998
998
 
999
- if data.get("is_shared", None) is not None and \
1000
- search_filter.is_shared != data["is_shared"] and \
1001
- (
1002
- data.get("project_id", None) is None or
1003
- (
999
+ if (
1000
+ data.get("is_shared", None) is not None
1001
+ and search_filter.is_shared != data["is_shared"]
1002
+ and (
1003
+ data.get("project_id", None) is None
1004
+ or (
1004
1005
  data["project_id"] is not None
1005
1006
  and not has_manager_project_access(data["project_id"])
1006
- )
1007
- ):
1007
+ )
1008
+ )
1009
+ ):
1008
1010
  data["is_shared"] = False
1009
1011
 
1010
1012
  if (
@@ -1105,8 +1107,8 @@ def get_user_filter_groups(current_user_id):
1105
1107
 
1106
1108
  department_id = search_filter_group.department_id
1107
1109
  is_in_departments = (
1108
- department_id is not None and \
1109
- str(department_id) in current_user["departments"]
1110
+ department_id is not None
1111
+ and str(department_id) in current_user["departments"]
1110
1112
  )
1111
1113
  if department_id is None or is_manager or is_in_departments:
1112
1114
  subresult = result[search_filter_group.list_type]
@@ -1130,7 +1132,7 @@ def create_filter_group(
1130
1132
  project_id=None,
1131
1133
  entity_type=None,
1132
1134
  is_shared=False,
1133
- department_id=None
1135
+ department_id=None,
1134
1136
  ):
1135
1137
  """
1136
1138
  Add a new search filter group to the database.
@@ -1193,22 +1195,26 @@ def update_filter_group(search_filter_group_id, data):
1193
1195
  if search_filter_group is None:
1194
1196
  raise SearchFilterGroupNotFoundException
1195
1197
 
1196
- if data.get("is_shared", None) is not None and \
1197
- search_filter_group.is_shared != data["is_shared"] and \
1198
- (
1199
- data.get("project_id", None) is None or
1200
- (
1198
+ if (
1199
+ data.get("is_shared", None) is not None
1200
+ and search_filter_group.is_shared != data["is_shared"]
1201
+ and (
1202
+ data.get("project_id", None) is None
1203
+ or (
1201
1204
  data["project_id"] is not None
1202
1205
  and not has_manager_project_access(data["project_id"])
1203
- )
1204
- ):
1205
- data["is_shared"] = False
1206
+ )
1207
+ )
1208
+ ):
1209
+ data["is_shared"] = False
1206
1210
 
1207
1211
  search_filter_group.update(data)
1208
1212
 
1209
- if data.get("is_shared", None) is not None \
1210
- and data.get("project_id", None) is not None \
1211
- and has_manager_project_access(data["project_id"]):
1213
+ if (
1214
+ data.get("is_shared", None) is not None
1215
+ and data.get("project_id", None) is not None
1216
+ and has_manager_project_access(data["project_id"])
1217
+ ):
1212
1218
  if (
1213
1219
  SearchFilter.query.filter_by(
1214
1220
  search_filter_group_id=search_filter_group_id
zou/app/utils/string.py CHANGED
@@ -6,6 +6,8 @@ def strtobool(val):
6
6
  """
7
7
  if isinstance(val, bool):
8
8
  return val
9
+ if isinstance(val, int):
10
+ return bool(val)
9
11
  elif val.lower() in ("y", "yes", "t", "true", "on", "1"):
10
12
  return True
11
13
  elif val.lower() in ("n", "no", "f", "false", "off", "0"):
@@ -5,6 +5,7 @@ Revises: 8e67c183bed7
5
5
  Create Date: 2024-10-11 15:52:29.740222
6
6
 
7
7
  """
8
+
8
9
  from alembic import op
9
10
  import sqlalchemy as sa
10
11
  import sqlalchemy_utils
@@ -12,33 +13,61 @@ import sqlalchemy_utils
12
13
  import uuid
13
14
 
14
15
  # revision identifiers, used by Alembic.
15
- revision = '9d3bb33c6fc6'
16
- down_revision = '8e67c183bed7'
16
+ revision = "9d3bb33c6fc6"
17
+ down_revision = "8e67c183bed7"
17
18
  branch_labels = None
18
19
  depends_on = None
19
20
 
20
21
 
21
22
  def upgrade():
22
23
  # ### commands auto generated by Alembic - please adjust! ###
23
- with op.batch_alter_table('search_filter', schema=None) as batch_op:
24
- batch_op.add_column(sa.Column('department_id', sqlalchemy_utils.types.uuid.UUIDType(binary=False), default=uuid.uuid4, nullable=True))
25
- batch_op.create_foreign_key(None, 'department', ['department_id'], ['id'])
24
+ with op.batch_alter_table("search_filter", schema=None) as batch_op:
25
+ batch_op.add_column(
26
+ sa.Column(
27
+ "department_id",
28
+ sqlalchemy_utils.types.uuid.UUIDType(binary=False),
29
+ default=uuid.uuid4,
30
+ nullable=True,
31
+ )
32
+ )
33
+ batch_op.create_foreign_key(
34
+ "search_filter_department_id_fkey",
35
+ "department",
36
+ ["department_id"],
37
+ ["id"],
38
+ )
26
39
 
27
- with op.batch_alter_table('search_filter_group', schema=None) as batch_op:
28
- batch_op.add_column(sa.Column('department_id', sqlalchemy_utils.types.uuid.UUIDType(binary=False), default=uuid.uuid4, nullable=True))
29
- batch_op.create_foreign_key(None, 'department', ['department_id'], ['id'])
40
+ with op.batch_alter_table("search_filter_group", schema=None) as batch_op:
41
+ batch_op.add_column(
42
+ sa.Column(
43
+ "department_id",
44
+ sqlalchemy_utils.types.uuid.UUIDType(binary=False),
45
+ default=uuid.uuid4,
46
+ nullable=True,
47
+ )
48
+ )
49
+ batch_op.create_foreign_key(
50
+ "search_filter_group_department_id_fkey",
51
+ "department",
52
+ ["department_id"],
53
+ ["id"],
54
+ )
30
55
 
31
56
  # ### end Alembic commands ###
32
57
 
33
58
 
34
59
  def downgrade():
35
60
  # ### commands auto generated by Alembic - please adjust! ###
36
- with op.batch_alter_table('search_filter_group', schema=None) as batch_op:
37
- batch_op.drop_constraint(None, type_='foreignkey')
38
- batch_op.drop_column('department_id')
61
+ with op.batch_alter_table("search_filter_group", schema=None) as batch_op:
62
+ batch_op.drop_constraint(
63
+ "search_filter_group_department_id_fkey", type_="foreignkey"
64
+ )
65
+ batch_op.drop_column("department_id")
39
66
 
40
- with op.batch_alter_table('search_filter', schema=None) as batch_op:
41
- batch_op.drop_constraint(None, type_='foreignkey')
42
- batch_op.drop_column('department_id')
67
+ with op.batch_alter_table("search_filter", schema=None) as batch_op:
68
+ batch_op.drop_constraint(
69
+ "search_filter_department_id_fkey", type_="foreignkey"
70
+ )
71
+ batch_op.drop_column("department_id")
43
72
 
44
73
  # ### end Alembic commands ###
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zou
3
- Version: 0.19.60
3
+ Version: 0.19.61
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
@@ -41,7 +41,7 @@ Requires-Dist: flask-socketio ==5.4.1
41
41
  Requires-Dist: flask ==3.0.3
42
42
  Requires-Dist: gazu ==0.10.16
43
43
  Requires-Dist: gevent-websocket ==0.10.1
44
- Requires-Dist: gevent ==24.10.2
44
+ Requires-Dist: gevent ==24.10.3
45
45
  Requires-Dist: gunicorn ==23.0.0
46
46
  Requires-Dist: isoweek ==1.3.3
47
47
  Requires-Dist: itsdangerous ==2.2.0
@@ -52,9 +52,9 @@ Requires-Dist: meilisearch ==0.31.5
52
52
  Requires-Dist: opencv-python ==4.10.0.84
53
53
  Requires-Dist: OpenTimelineIO ==0.17.0
54
54
  Requires-Dist: OpenTimelineIO-Plugins ==0.17.0
55
- Requires-Dist: orjson ==3.10.7
55
+ Requires-Dist: orjson ==3.10.9
56
56
  Requires-Dist: pillow ==11.0.0
57
- Requires-Dist: psutil ==6.0.0
57
+ Requires-Dist: psutil ==6.1.0
58
58
  Requires-Dist: psycopg[binary] ==3.2.3
59
59
  Requires-Dist: pyotp ==2.9.0
60
60
  Requires-Dist: pysaml2 ==7.5.0
@@ -81,7 +81,7 @@ Requires-Dist: pre-commit ==4.0.1 ; extra == 'lint'
81
81
  Provides-Extra: monitoring
82
82
  Requires-Dist: prometheus-flask-exporter ==0.23.1 ; extra == 'monitoring'
83
83
  Requires-Dist: pygelf ==0.4.2 ; extra == 'monitoring'
84
- Requires-Dist: sentry-sdk ==2.16.0 ; extra == 'monitoring'
84
+ Requires-Dist: sentry-sdk ==2.17.0 ; extra == 'monitoring'
85
85
  Provides-Extra: prod
86
86
  Requires-Dist: gunicorn ; extra == 'prod'
87
87
  Requires-Dist: gevent ; extra == 'prod'
@@ -1,11 +1,11 @@
1
- zou/__init__.py,sha256=Q-R4YnG0E1Dy8riIkq9R2p9ONeBkY4iPua_nw1RTmDA,24
1
+ zou/__init__.py,sha256=0ipQS0LM1jmY4x1OqN5dNC2NcN78T34DBnoO5MxyUvw,24
2
2
  zou/cli.py,sha256=DHHf4mz33Bi0gGFJ0GdRUpjrMrMSQYyVubJFppHPZlU,18914
3
3
  zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
4
4
  zou/event_stream.py,sha256=_tue9Ry3aqCniZpKGhWJaY1Eo_fd6zOAfnzPvh_mJzU,8489
5
5
  zou/job_settings.py,sha256=_aqBhujt2Q8sXRWIbgbDf-LUdXRdBimdtTc-fZbiXoY,202
6
6
  zou/app/__init__.py,sha256=AJEGrLTirr5zZmA8DVSjZedtTuDg6eg9rG4kXMimPnQ,6966
7
7
  zou/app/api.py,sha256=JTB_IMVO8EOoyqx9KdRkiIix0chOLi0yGDY-verUJXA,5127
8
- zou/app/config.py,sha256=V6kV3JzaR2yGz8F3vcsb-v4EB9VvvirEPtGeQMot9bI,6649
8
+ zou/app/config.py,sha256=CR0wvWVF_T0Sfh-AGTphyXnMr0dm_ZVdXUOH3WUTz2s,6646
9
9
  zou/app/mixin.py,sha256=eYwfS_CUFvNmldaQXrjsN5mK_gX0wYrBFykfx60uUM8,4897
10
10
  zou/app/swagger.py,sha256=Jr7zsMqJi0V4FledODOdu-aqqVE02jMFzhqVxHK0_2c,54158
11
11
  zou/app/blueprints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -83,7 +83,7 @@ zou/app/blueprints/export/csv/time_spents.py,sha256=yYPtilOxfQD5mBwyh9h-PbTQBpab
83
83
  zou/app/blueprints/files/__init__.py,sha256=7Wty30JW2OXIn-tBFXOWWmPuHnsnxPpH3jNtHvvr9tY,3987
84
84
  zou/app/blueprints/files/resources.py,sha256=8SIV8kaqv3dxyL8nyqG3QiZmk5ZYIvUxw6k1ic-jhBs,69786
85
85
  zou/app/blueprints/index/__init__.py,sha256=Dh3oQiirpg8RCkfVOuk3irIjSvUvuRf0jPxE6oGubz0,828
86
- zou/app/blueprints/index/resources.py,sha256=UUBHWGDIyx6xgk2Jt_uwvpSETB0xeIjQ3quYVN0uOlc,8734
86
+ zou/app/blueprints/index/resources.py,sha256=_JiNodmq3-XCIz4vF0MYkkkg1Wdzh7Fl19KU0TTia1M,8742
87
87
  zou/app/blueprints/news/__init__.py,sha256=HxBXjC15dVbotNAZ0CLf02iwUjxJr20kgf8_kT_9nwM,505
88
88
  zou/app/blueprints/news/resources.py,sha256=SL0RYo-fs23GjQU1IW4kuEBg2SHdaXaonrOoOnWafdw,7183
89
89
  zou/app/blueprints/persons/__init__.py,sha256=0cnHHw3K_8OEMm0qOi3wKVomSAg9IJSnVjAXabMeHks,3893
@@ -129,7 +129,7 @@ zou/app/blueprints/source/shotgun/versions.py,sha256=8Mb35e5p3FLbbiu6AZb9tJErDKz
129
129
  zou/app/blueprints/tasks/__init__.py,sha256=pNUqVEVX1KVu1IzRRJNsziPkhWKXqgyvQsNp7LbmIxo,4342
130
130
  zou/app/blueprints/tasks/resources.py,sha256=b5z4OolidyKdKTP5kuZLk7tDLhgDs5W3rkH4ZWlwB0Y,56020
131
131
  zou/app/blueprints/user/__init__.py,sha256=H9zCHcVobC6jq6dTToXKAjnZmDA0a9gChHiIP3BcZsc,4586
132
- zou/app/blueprints/user/resources.py,sha256=07TXMEJG__aBRotgKnduoDf2Y59J-9VcMzUDXVUHzCI,39919
132
+ zou/app/blueprints/user/resources.py,sha256=loCigQvPCoRw6nVu_9TIY7pjUByJgk6vutFPSo0MwzI,39891
133
133
  zou/app/file_trees/default.json,sha256=ryUrEmQYE8B_WkzCoQLgmem3N9yNwMIWx9G8p3HfG9o,2310
134
134
  zou/app/file_trees/simple.json,sha256=VBI43Z3rjQxtTpVCq3ktUgS0UB8x-aTowKL9LXuXCFI,3149
135
135
  zou/app/indexer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -213,7 +213,7 @@ zou/app/services/sync_service.py,sha256=EunfXlma_IIb7011A_xLQLVQGAi-MteKgm2Y2NAx
213
213
  zou/app/services/tasks_service.py,sha256=IoogHBoZhbJegnl5SYGgOaBp2YVqrL22Gccjfp8dPn8,69335
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=O6KdOVqJBGHCzRqykqnrqWgH1ijRZLtxqA6QFaNaZ5g,50471
216
+ zou/app/services/user_service.py,sha256=Ih7-I0t_hzoRx_1Ya6zlvlWSLK0AabVtcXNPm7eYZNo,50514
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
@@ -244,7 +244,7 @@ zou/app/utils/query.py,sha256=q8ETGPAqnz0Pt9xWoQt5o7FFAVYUKVCJiWpwefIr-iU,4592
244
244
  zou/app/utils/remote_job.py,sha256=QPxcCWEv-NM1Q4IQawAyJAiSORwkMeOlByQb9OCShEw,2522
245
245
  zou/app/utils/saml.py,sha256=m8wt_2RnMEHSrFvqCRGF91U5mwkqC6W-iBcx8N0LAqs,1679
246
246
  zou/app/utils/shell.py,sha256=D30NuOzr1D6jsa9OF69JYXyqYNhtIdnfKSVYW4irbz8,405
247
- zou/app/utils/string.py,sha256=ZIJuQRe7ml669-T1o9keQtk_lV2D1DkS9ARQdexlQ6Y,404
247
+ zou/app/utils/string.py,sha256=MX-zsf55ecyhedu4mk55FhByx_hOc_dSe7B1aVjJzO0,458
248
248
  zou/app/utils/thumbnail.py,sha256=eUb25So1fbjxZKYRpTOxLcZ0vww5zXNVkfVIa_tu5Dk,6625
249
249
  zou/migrations/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
250
250
  zou/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -354,7 +354,7 @@ zou/migrations/versions/99825b9cc778_.py,sha256=vleoLh_fCLwNnCmgZkW5x1-lJ09CgjPd
354
354
  zou/migrations/versions/9a09467f9b2c_.py,sha256=cjSO3cXzHHhlcaQhShF9WlxmBWIfwLYSyIb9C6B5Dwc,1246
355
355
  zou/migrations/versions/9b85c14fa8a7_add_day_off_new_columns.py,sha256=u6n5X_hwoeH9XnkWHB4PvVvGVrkddgDamweMrlPFQ9I,2106
356
356
  zou/migrations/versions/9bd17364fc18_.py,sha256=nruaGMczzkWkya_D11QEU3uiU1UVEUItM6svSBjOw2c,1890
357
- zou/migrations/versions/9d3bb33c6fc6_add_department_keys_to_filter_models.py,sha256=iWcJUdkPThoWONEHQ64hpQYSVcax0lO7rHJ3DVZYRDs,1587
357
+ zou/migrations/versions/9d3bb33c6fc6_add_department_keys_to_filter_models.py,sha256=xUd0OIqp0q9l-pC6wCn2tfgCi6maeud6jf1CYGCHnxA,2084
358
358
  zou/migrations/versions/9e5b3a9b0cee_add_new_column_metadatadescriptor_data_type_.py,sha256=HT34AjM9yN1IvLrCzx4-YOiocFDnPQ-FJ05icPCBnNo,5517
359
359
  zou/migrations/versions/9f8445f9b42c_add_man_days_fields.py,sha256=muFsM2g_m-L5Zss36roTsjCoSDdhu_e4hVQntiNHyiY,828
360
360
  zou/migrations/versions/a23682ccc1f1_.py,sha256=dVOUWldUZyLuLc6_HrgKUI5XH5-6Vjwai6Ew9kygkHw,1663
@@ -413,9 +413,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
413
413
  zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
414
414
  zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
415
415
  zou/utils/movie.py,sha256=u9LCEOvmkxwm-KiZ6jKNdB9LSC6XXUDwJpVx8LkDwJg,16416
416
- zou-0.19.60.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
417
- zou-0.19.60.dist-info/METADATA,sha256=EqDZA8e8KYpG4COrPyaVuxsMAeFLd9pHuzKCtAY605Q,6676
418
- zou-0.19.60.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
419
- zou-0.19.60.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
420
- zou-0.19.60.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
421
- zou-0.19.60.dist-info/RECORD,,
416
+ zou-0.19.61.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
417
+ zou-0.19.61.dist-info/METADATA,sha256=hSLIfr761zcENVUpwc4JbG4SPICbF9J3gyAkbmIvgFc,6676
418
+ zou-0.19.61.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
419
+ zou-0.19.61.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
420
+ zou-0.19.61.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
421
+ zou-0.19.61.dist-info/RECORD,,
File without changes
File without changes