zou 0.19.35__py3-none-any.whl → 0.19.37__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 +1 -1
- zou/app/blueprints/user/resources.py +7 -14
- zou/app/models/search_filter.py +7 -1
- zou/app/models/search_filter_group.py +7 -0
- zou/app/services/tasks_service.py +6 -2
- zou/app/services/user_service.py +107 -27
- zou/migrations/versions/680c64565f9d_for_searchfiltergroup_is_shared.py +35 -0
- zou/migrations/versions/be56dc0fb760_for_is_shared_disallow_nullable.py +102 -0
- {zou-0.19.35.dist-info → zou-0.19.37.dist-info}/METADATA +2 -2
- {zou-0.19.35.dist-info → zou-0.19.37.dist-info}/RECORD +14 -12
- {zou-0.19.35.dist-info → zou-0.19.37.dist-info}/LICENSE +0 -0
- {zou-0.19.35.dist-info → zou-0.19.37.dist-info}/WHEEL +0 -0
- {zou-0.19.35.dist-info → zou-0.19.37.dist-info}/entry_points.txt +0 -0
- {zou-0.19.35.dist-info → zou-0.19.37.dist-info}/top_level.txt +0 -0
zou/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.19.
|
|
1
|
+
__version__ = "0.19.37"
|
|
@@ -535,14 +535,6 @@ class FiltersResource(Resource, ArgsMixin):
|
|
|
535
535
|
"""
|
|
536
536
|
arguments = self.get_arguments()
|
|
537
537
|
|
|
538
|
-
if arguments["project_id"] is None or (
|
|
539
|
-
arguments["project_id"] is not None
|
|
540
|
-
and not user_service.has_manager_project_access(
|
|
541
|
-
arguments["project_id"]
|
|
542
|
-
)
|
|
543
|
-
):
|
|
544
|
-
arguments["is_shared"] = False
|
|
545
|
-
|
|
546
538
|
return (
|
|
547
539
|
user_service.create_filter(
|
|
548
540
|
arguments["list_type"],
|
|
@@ -551,6 +543,7 @@ class FiltersResource(Resource, ArgsMixin):
|
|
|
551
543
|
arguments["project_id"],
|
|
552
544
|
arguments["entity_type"],
|
|
553
545
|
arguments["is_shared"],
|
|
546
|
+
arguments["search_filter_group_id"],
|
|
554
547
|
),
|
|
555
548
|
201,
|
|
556
549
|
)
|
|
@@ -564,6 +557,7 @@ class FiltersResource(Resource, ArgsMixin):
|
|
|
564
557
|
("project_id", None, False),
|
|
565
558
|
("entity_type", None, False),
|
|
566
559
|
("is_shared", False, False, bool),
|
|
560
|
+
("search_filter_group_id", None, False),
|
|
567
561
|
]
|
|
568
562
|
)
|
|
569
563
|
|
|
@@ -600,12 +594,6 @@ class FilterResource(Resource, ArgsMixin):
|
|
|
600
594
|
]
|
|
601
595
|
)
|
|
602
596
|
|
|
603
|
-
if data.get("project_id", None) is None or (
|
|
604
|
-
data["project_id"] is not None
|
|
605
|
-
and not user_service.has_manager_project_access(data["project_id"])
|
|
606
|
-
):
|
|
607
|
-
data["is_shared"] = False
|
|
608
|
-
|
|
609
597
|
data = self.clear_empty_fields(
|
|
610
598
|
data, ignored_fields=["search_filter_group_id"]
|
|
611
599
|
)
|
|
@@ -696,6 +684,7 @@ class FilterGroupsResource(Resource, ArgsMixin):
|
|
|
696
684
|
arguments["color"],
|
|
697
685
|
arguments["project_id"],
|
|
698
686
|
arguments["entity_type"],
|
|
687
|
+
arguments["is_shared"],
|
|
699
688
|
),
|
|
700
689
|
201,
|
|
701
690
|
)
|
|
@@ -707,6 +696,7 @@ class FilterGroupsResource(Resource, ArgsMixin):
|
|
|
707
696
|
("color", "", True),
|
|
708
697
|
("list_type", "todo", True),
|
|
709
698
|
("project_id", None, False),
|
|
699
|
+
("is_shared", False, False, bool),
|
|
710
700
|
("entity_type", None, False),
|
|
711
701
|
]
|
|
712
702
|
)
|
|
@@ -752,8 +742,11 @@ class FilterGroupResource(Resource, ArgsMixin):
|
|
|
752
742
|
[
|
|
753
743
|
("name", None, False),
|
|
754
744
|
("color", None, False),
|
|
745
|
+
("is_shared", None, False, bool),
|
|
746
|
+
("project_id", None, None),
|
|
755
747
|
]
|
|
756
748
|
)
|
|
749
|
+
|
|
757
750
|
data = self.clear_empty_fields(data)
|
|
758
751
|
user_filter = user_service.update_filter_group(filter_group_id, data)
|
|
759
752
|
return user_filter, 200
|
zou/app/models/search_filter.py
CHANGED
|
@@ -3,6 +3,7 @@ from sqlalchemy_utils import UUIDType
|
|
|
3
3
|
from zou.app import db
|
|
4
4
|
from zou.app.models.serializer import SerializerMixin
|
|
5
5
|
from zou.app.models.base import BaseMixin
|
|
6
|
+
from sqlalchemy.sql import expression
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class SearchFilter(db.Model, BaseMixin, SerializerMixin):
|
|
@@ -15,7 +16,12 @@ class SearchFilter(db.Model, BaseMixin, SerializerMixin):
|
|
|
15
16
|
entity_type = db.Column(db.String(80))
|
|
16
17
|
name = db.Column(db.String(200), nullable=False, default="")
|
|
17
18
|
search_query = db.Column(db.String(500), nullable=False, default="")
|
|
18
|
-
is_shared = db.Column(
|
|
19
|
+
is_shared = db.Column(
|
|
20
|
+
db.Boolean,
|
|
21
|
+
server_default=expression.false(),
|
|
22
|
+
default=False,
|
|
23
|
+
nullable=False,
|
|
24
|
+
)
|
|
19
25
|
|
|
20
26
|
search_filter_group_id = db.Column(
|
|
21
27
|
UUIDType(binary=False),
|
|
@@ -3,6 +3,7 @@ from sqlalchemy_utils import UUIDType
|
|
|
3
3
|
from zou.app import db
|
|
4
4
|
from zou.app.models.serializer import SerializerMixin
|
|
5
5
|
from zou.app.models.base import BaseMixin
|
|
6
|
+
from sqlalchemy.sql import expression
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class SearchFilterGroup(db.Model, BaseMixin, SerializerMixin):
|
|
@@ -14,6 +15,12 @@ class SearchFilterGroup(db.Model, BaseMixin, SerializerMixin):
|
|
|
14
15
|
entity_type = db.Column(db.String(80))
|
|
15
16
|
name = db.Column(db.String(200), nullable=False, default="")
|
|
16
17
|
color = db.Column(db.String(8), nullable=False, default="")
|
|
18
|
+
is_shared = db.Column(
|
|
19
|
+
db.Boolean,
|
|
20
|
+
server_default=expression.false(),
|
|
21
|
+
default=False,
|
|
22
|
+
nullable=False,
|
|
23
|
+
)
|
|
17
24
|
|
|
18
25
|
person_id = db.Column(UUIDType(binary=False), db.ForeignKey("person.id"))
|
|
19
26
|
project_id = db.Column(UUIDType(binary=False), db.ForeignKey("project.id"))
|
|
@@ -1913,8 +1913,12 @@ def get_open_tasks(
|
|
|
1913
1913
|
query_stats = query_stats.filter(TaskStatus.id == task_status_id)
|
|
1914
1914
|
|
|
1915
1915
|
if person_id is not None:
|
|
1916
|
-
|
|
1917
|
-
|
|
1916
|
+
if person_id == "unassigned":
|
|
1917
|
+
query = query.filter(Task.assignees == None)
|
|
1918
|
+
query_stats = query_stats.filter(Task.assignees == None)
|
|
1919
|
+
else:
|
|
1920
|
+
query = query.filter(Task.assignees.any(id=person_id))
|
|
1921
|
+
query_stats = query_stats.filter(Task.assignees.any(id=person_id))
|
|
1918
1922
|
|
|
1919
1923
|
if start_date is not None:
|
|
1920
1924
|
query = query.filter(Task.start_date >= start_date)
|
zou/app/services/user_service.py
CHANGED
|
@@ -32,6 +32,7 @@ from zou.app.services.exception import (
|
|
|
32
32
|
SearchFilterNotFoundException,
|
|
33
33
|
SearchFilterGroupNotFoundException,
|
|
34
34
|
NotificationNotFoundException,
|
|
35
|
+
WrongParameterException,
|
|
35
36
|
)
|
|
36
37
|
from zou.app.utils import cache, fields, permissions
|
|
37
38
|
|
|
@@ -873,22 +874,17 @@ def get_user_filters(current_user_id):
|
|
|
873
874
|
result = {}
|
|
874
875
|
|
|
875
876
|
filters = (
|
|
876
|
-
SearchFilter.query.
|
|
877
|
-
.
|
|
877
|
+
SearchFilter.query.outerjoin(Project)
|
|
878
|
+
.outerjoin(ProjectStatus)
|
|
878
879
|
.filter(
|
|
879
880
|
or_(
|
|
880
881
|
SearchFilter.person_id == current_user_id,
|
|
881
882
|
SearchFilter.is_shared == True,
|
|
882
883
|
)
|
|
883
884
|
)
|
|
884
|
-
.filter(
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
filters = (
|
|
889
|
-
filters
|
|
890
|
-
+ SearchFilter.query.filter(SearchFilter.person_id == current_user_id)
|
|
891
|
-
.filter(SearchFilter.project_id == None)
|
|
885
|
+
.filter(
|
|
886
|
+
or_(build_open_project_filter(), SearchFilter.project_id == None)
|
|
887
|
+
)
|
|
892
888
|
.all()
|
|
893
889
|
)
|
|
894
890
|
|
|
@@ -911,12 +907,35 @@ def get_user_filters(current_user_id):
|
|
|
911
907
|
|
|
912
908
|
|
|
913
909
|
def create_filter(
|
|
914
|
-
list_type,
|
|
910
|
+
list_type,
|
|
911
|
+
name,
|
|
912
|
+
query,
|
|
913
|
+
project_id=None,
|
|
914
|
+
entity_type=None,
|
|
915
|
+
is_shared=False,
|
|
916
|
+
search_filter_group_id=None,
|
|
915
917
|
):
|
|
916
918
|
"""
|
|
917
919
|
Add a new search filter to the database.
|
|
918
920
|
"""
|
|
919
921
|
current_user = persons_service.get_current_user()
|
|
922
|
+
|
|
923
|
+
if project_id is None or (
|
|
924
|
+
project_id is not None and not has_manager_project_access(project_id)
|
|
925
|
+
):
|
|
926
|
+
is_shared = False
|
|
927
|
+
|
|
928
|
+
if search_filter_group_id is not None:
|
|
929
|
+
search_filter_group = SearchFilterGroup.get_by(
|
|
930
|
+
id=search_filter_group_id
|
|
931
|
+
)
|
|
932
|
+
if search_filter_group is None:
|
|
933
|
+
raise SearchFilterGroupNotFoundException
|
|
934
|
+
if is_shared != search_filter_group.is_shared:
|
|
935
|
+
raise WrongParameterException(
|
|
936
|
+
"A search filter should have the same value for is_shared than its search filter group."
|
|
937
|
+
)
|
|
938
|
+
|
|
920
939
|
search_filter = SearchFilter.create(
|
|
921
940
|
list_type=list_type,
|
|
922
941
|
name=name,
|
|
@@ -925,6 +944,7 @@ def create_filter(
|
|
|
925
944
|
person_id=current_user["id"],
|
|
926
945
|
entity_type=entity_type,
|
|
927
946
|
is_shared=is_shared,
|
|
947
|
+
search_filter_group_id=search_filter_group_id,
|
|
928
948
|
)
|
|
929
949
|
search_filter.serialize()
|
|
930
950
|
if search_filter.is_shared:
|
|
@@ -944,6 +964,30 @@ def update_filter(search_filter_id, data):
|
|
|
944
964
|
)
|
|
945
965
|
if search_filter is None:
|
|
946
966
|
raise SearchFilterNotFoundException
|
|
967
|
+
|
|
968
|
+
if data.get("project_id", None) is None or (
|
|
969
|
+
data["project_id"] is not None
|
|
970
|
+
and not has_manager_project_access(data["project_id"])
|
|
971
|
+
):
|
|
972
|
+
data["is_shared"] = False
|
|
973
|
+
|
|
974
|
+
if (
|
|
975
|
+
search_filter_group_id := data.get(
|
|
976
|
+
"search_filter_group_id", search_filter.search_filter_group_id
|
|
977
|
+
)
|
|
978
|
+
) is not None:
|
|
979
|
+
search_filter_group = SearchFilterGroup.get_by(
|
|
980
|
+
id=search_filter_group_id
|
|
981
|
+
)
|
|
982
|
+
if search_filter_group is None:
|
|
983
|
+
raise SearchFilterGroupNotFoundException
|
|
984
|
+
if (
|
|
985
|
+
data.get("is_shared", search_filter.is_shared)
|
|
986
|
+
!= search_filter_group.is_shared
|
|
987
|
+
):
|
|
988
|
+
raise WrongParameterException(
|
|
989
|
+
"A search filter should have the same value for is_shared than its search filter group."
|
|
990
|
+
)
|
|
947
991
|
search_filter.update(data)
|
|
948
992
|
if search_filter.is_shared:
|
|
949
993
|
clear_filter_cache()
|
|
@@ -991,21 +1035,19 @@ def get_user_filter_groups(current_user_id):
|
|
|
991
1035
|
result = {}
|
|
992
1036
|
|
|
993
1037
|
filter_groups = (
|
|
994
|
-
SearchFilterGroup.query.
|
|
1038
|
+
SearchFilterGroup.query.outerjoin(
|
|
995
1039
|
Project, Project.id == SearchFilterGroup.project_id
|
|
996
1040
|
)
|
|
997
|
-
.
|
|
998
|
-
|
|
999
|
-
.filter(build_open_project_filter())
|
|
1000
|
-
.all()
|
|
1001
|
-
)
|
|
1002
|
-
|
|
1003
|
-
filter_groups = (
|
|
1004
|
-
filter_groups
|
|
1005
|
-
+ SearchFilterGroup.query.filter(
|
|
1006
|
-
SearchFilterGroup.person_id == current_user_id
|
|
1041
|
+
.outerjoin(
|
|
1042
|
+
ProjectStatus, ProjectStatus.id == Project.project_status_id
|
|
1007
1043
|
)
|
|
1008
|
-
.filter(
|
|
1044
|
+
.filter(
|
|
1045
|
+
or_(
|
|
1046
|
+
SearchFilterGroup.person_id == current_user_id,
|
|
1047
|
+
SearchFilterGroup.is_shared == True,
|
|
1048
|
+
)
|
|
1049
|
+
)
|
|
1050
|
+
.filter(or_(build_open_project_filter(), Project.id == None))
|
|
1009
1051
|
.all()
|
|
1010
1052
|
)
|
|
1011
1053
|
|
|
@@ -1028,12 +1070,16 @@ def get_user_filter_groups(current_user_id):
|
|
|
1028
1070
|
|
|
1029
1071
|
|
|
1030
1072
|
def create_filter_group(
|
|
1031
|
-
list_type, name, color, project_id=None, entity_type=None
|
|
1073
|
+
list_type, name, color, project_id=None, entity_type=None, is_shared=False
|
|
1032
1074
|
):
|
|
1033
1075
|
"""
|
|
1034
1076
|
Add a new search filter group to the database.
|
|
1035
1077
|
"""
|
|
1036
1078
|
current_user = persons_service.get_current_user()
|
|
1079
|
+
if project_id is None or (
|
|
1080
|
+
project_id is not None and not has_manager_project_access(project_id)
|
|
1081
|
+
):
|
|
1082
|
+
is_shared = False
|
|
1037
1083
|
search_filter_group = SearchFilterGroup.create(
|
|
1038
1084
|
list_type=list_type,
|
|
1039
1085
|
name=name,
|
|
@@ -1041,9 +1087,13 @@ def create_filter_group(
|
|
|
1041
1087
|
project_id=project_id,
|
|
1042
1088
|
person_id=current_user["id"],
|
|
1043
1089
|
entity_type=entity_type,
|
|
1090
|
+
is_shared=is_shared,
|
|
1044
1091
|
)
|
|
1045
1092
|
search_filter_group.serialize()
|
|
1046
|
-
|
|
1093
|
+
if search_filter_group.is_shared:
|
|
1094
|
+
clear_filter_group_cache()
|
|
1095
|
+
else:
|
|
1096
|
+
clear_filter_group_cache(current_user["id"])
|
|
1047
1097
|
return search_filter_group.serialize()
|
|
1048
1098
|
|
|
1049
1099
|
|
|
@@ -1070,8 +1120,27 @@ def update_filter_group(search_filter_group_id, data):
|
|
|
1070
1120
|
)
|
|
1071
1121
|
if search_filter_group is None:
|
|
1072
1122
|
raise SearchFilterGroupNotFoundException
|
|
1123
|
+
if data.get("project_id", None) is None or (
|
|
1124
|
+
data["project_id"] is not None
|
|
1125
|
+
and not has_manager_project_access(data["project_id"])
|
|
1126
|
+
):
|
|
1127
|
+
data["is_shared"] = False
|
|
1073
1128
|
search_filter_group.update(data)
|
|
1074
|
-
|
|
1129
|
+
|
|
1130
|
+
if data.get("is_shared", None) is not None:
|
|
1131
|
+
if (
|
|
1132
|
+
SearchFilter.query.filter_by(
|
|
1133
|
+
search_filter_group_id=search_filter_group_id
|
|
1134
|
+
).update({"is_shared": data["is_shared"]})
|
|
1135
|
+
> 0
|
|
1136
|
+
):
|
|
1137
|
+
SearchFilter.query.session.commit()
|
|
1138
|
+
clear_filter_cache()
|
|
1139
|
+
|
|
1140
|
+
if search_filter_group.is_shared:
|
|
1141
|
+
clear_filter_group_cache()
|
|
1142
|
+
else:
|
|
1143
|
+
clear_filter_group_cache(current_user["id"])
|
|
1075
1144
|
return search_filter_group.serialize()
|
|
1076
1145
|
|
|
1077
1146
|
|
|
@@ -1085,8 +1154,19 @@ def remove_filter_group(search_filter_group_id):
|
|
|
1085
1154
|
)
|
|
1086
1155
|
if search_filter_group is None:
|
|
1087
1156
|
raise SearchFilterGroupNotFoundException
|
|
1157
|
+
if (
|
|
1158
|
+
SearchFilter.query.filter_by(
|
|
1159
|
+
search_filter_group_id=search_filter_group_id
|
|
1160
|
+
).delete()
|
|
1161
|
+
> 0
|
|
1162
|
+
):
|
|
1163
|
+
SearchFilter.query.session.commit()
|
|
1164
|
+
clear_filter_cache()
|
|
1088
1165
|
search_filter_group.delete()
|
|
1089
|
-
|
|
1166
|
+
if search_filter_group.is_shared:
|
|
1167
|
+
clear_filter_group_cache()
|
|
1168
|
+
else:
|
|
1169
|
+
clear_filter_group_cache(current_user["id"])
|
|
1090
1170
|
return search_filter_group.serialize()
|
|
1091
1171
|
|
|
1092
1172
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""For SearchFilterGroup.is_shared
|
|
2
|
+
|
|
3
|
+
Revision ID: 680c64565f9d
|
|
4
|
+
Revises: f344b867a911
|
|
5
|
+
Create Date: 2024-05-29 02:13:20.764614
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from alembic import op
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# revision identifiers, used by Alembic.
|
|
14
|
+
revision = "680c64565f9d"
|
|
15
|
+
down_revision = "f344b867a911"
|
|
16
|
+
branch_labels = None
|
|
17
|
+
depends_on = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def upgrade():
|
|
21
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
22
|
+
with op.batch_alter_table("search_filter_group", schema=None) as batch_op:
|
|
23
|
+
batch_op.add_column(
|
|
24
|
+
sa.Column("is_shared", sa.Boolean(), nullable=True)
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
# ### end Alembic commands ###
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def downgrade():
|
|
31
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
32
|
+
with op.batch_alter_table("search_filter_group", schema=None) as batch_op:
|
|
33
|
+
batch_op.drop_column("is_shared")
|
|
34
|
+
|
|
35
|
+
# ### end Alembic commands ###
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""For is_shared disallow nullable
|
|
2
|
+
|
|
3
|
+
Revision ID: be56dc0fb760
|
|
4
|
+
Revises: 680c64565f9d
|
|
5
|
+
Create Date: 2024-05-31 17:44:17.975779
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from alembic import op
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
from sqlalchemy import orm
|
|
12
|
+
from sqlalchemy.ext.declarative import declarative_base
|
|
13
|
+
from zou.migrations.utils.base import BaseMixin
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# revision identifiers, used by Alembic.
|
|
17
|
+
revision = "be56dc0fb760"
|
|
18
|
+
down_revision = "680c64565f9d"
|
|
19
|
+
branch_labels = None
|
|
20
|
+
depends_on = None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def upgrade():
|
|
24
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
25
|
+
|
|
26
|
+
base = declarative_base()
|
|
27
|
+
|
|
28
|
+
class SearchFilter(base, BaseMixin):
|
|
29
|
+
"""
|
|
30
|
+
Filters allow to store quick search on a list: asset list, shot list,
|
|
31
|
+
sequence list, todo-list...
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
__tablename__ = "search_filter"
|
|
35
|
+
list_type = sa.Column(sa.String(80), nullable=False, index=True)
|
|
36
|
+
entity_type = sa.Column(sa.String(80))
|
|
37
|
+
name = sa.Column(sa.String(200), nullable=False, default="")
|
|
38
|
+
search_query = sa.Column(sa.String(500), nullable=False, default="")
|
|
39
|
+
is_shared = sa.Column(
|
|
40
|
+
sa.Boolean,
|
|
41
|
+
default=False,
|
|
42
|
+
nullable=True,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
class SearchFilterGroup(base, BaseMixin):
|
|
46
|
+
"""
|
|
47
|
+
Groups are used to store search filters into sections.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
__tablename__ = "search_filter_group"
|
|
51
|
+
list_type = sa.Column(sa.String(80), nullable=False, index=True)
|
|
52
|
+
entity_type = sa.Column(sa.String(80))
|
|
53
|
+
name = sa.Column(sa.String(200), nullable=False, default="")
|
|
54
|
+
color = sa.Column(sa.String(8), nullable=False, default="")
|
|
55
|
+
is_shared = sa.Column(
|
|
56
|
+
sa.Boolean,
|
|
57
|
+
default=False,
|
|
58
|
+
nullable=True,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
bind = op.get_bind()
|
|
62
|
+
session = orm.Session(bind=bind)
|
|
63
|
+
session.query(SearchFilter).where(SearchFilter.is_shared == None).update(
|
|
64
|
+
{SearchFilter.is_shared: False}
|
|
65
|
+
)
|
|
66
|
+
session.query(SearchFilterGroup).where(
|
|
67
|
+
SearchFilterGroup.is_shared == None
|
|
68
|
+
).update({SearchFilterGroup.is_shared: False})
|
|
69
|
+
session.commit()
|
|
70
|
+
|
|
71
|
+
with op.batch_alter_table("search_filter", schema=None) as batch_op:
|
|
72
|
+
batch_op.alter_column(
|
|
73
|
+
"is_shared",
|
|
74
|
+
existing_type=sa.BOOLEAN(),
|
|
75
|
+
server_default=sa.sql.expression.false(),
|
|
76
|
+
nullable=False,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
with op.batch_alter_table("search_filter_group", schema=None) as batch_op:
|
|
80
|
+
batch_op.alter_column(
|
|
81
|
+
"is_shared",
|
|
82
|
+
existing_type=sa.BOOLEAN(),
|
|
83
|
+
server_default=sa.sql.expression.false(),
|
|
84
|
+
nullable=False,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# ### end Alembic commands ###
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def downgrade():
|
|
91
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
92
|
+
with op.batch_alter_table("search_filter_group", schema=None) as batch_op:
|
|
93
|
+
batch_op.alter_column(
|
|
94
|
+
"is_shared", existing_type=sa.BOOLEAN(), nullable=True
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
with op.batch_alter_table("search_filter", schema=None) as batch_op:
|
|
98
|
+
batch_op.alter_column(
|
|
99
|
+
"is_shared", existing_type=sa.BOOLEAN(), nullable=True
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# ### end Alembic commands ###
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zou
|
|
3
|
-
Version: 0.19.
|
|
3
|
+
Version: 0.19.37
|
|
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
|
|
@@ -62,7 +62,7 @@ Requires-Dist: python-slugify ==8.0.4
|
|
|
62
62
|
Requires-Dist: python-socketio ==5.11.2
|
|
63
63
|
Requires-Dist: pytz ==2024.1
|
|
64
64
|
Requires-Dist: redis ==5.0.4
|
|
65
|
-
Requires-Dist: requests ==2.32.
|
|
65
|
+
Requires-Dist: requests ==2.32.3
|
|
66
66
|
Requires-Dist: rq ==1.16.2
|
|
67
67
|
Requires-Dist: slackclient ==2.9.4
|
|
68
68
|
Requires-Dist: sqlalchemy-utils ==0.41.2
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
zou/__init__.py,sha256=
|
|
1
|
+
zou/__init__.py,sha256=KkzOGKhiP3xLG8rZ7ywDm1uoRC99oKsqlcFw0ELtiXw,24
|
|
2
2
|
zou/cli.py,sha256=mnY9MoD0SjY4KFa1qyYS4E5bjEqk1UIZpH0iYeZPGh8,17508
|
|
3
3
|
zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
|
|
4
4
|
zou/event_stream.py,sha256=zgob2dZKray2lxPa11hdRNmOg8XRlKDdRcGdF80ylwg,8245
|
|
@@ -128,7 +128,7 @@ zou/app/blueprints/source/shotgun/versions.py,sha256=8Mb35e5p3FLbbiu6AZb9tJErDKz
|
|
|
128
128
|
zou/app/blueprints/tasks/__init__.py,sha256=pNUqVEVX1KVu1IzRRJNsziPkhWKXqgyvQsNp7LbmIxo,4342
|
|
129
129
|
zou/app/blueprints/tasks/resources.py,sha256=oH-KHX2wtxoq_TWmxltKeGU8-t-2IYFbB3JwAyyaY0g,55293
|
|
130
130
|
zou/app/blueprints/user/__init__.py,sha256=dhNMmwLvlFqehC7-DPyjCNNkru1gmhPu4WEopHwIabI,4433
|
|
131
|
-
zou/app/blueprints/user/resources.py,sha256=
|
|
131
|
+
zou/app/blueprints/user/resources.py,sha256=YoPoPt0G4qZhbZFiBCbZ7e3nT3Xf6jgN8FITHPDV2P0,37305
|
|
132
132
|
zou/app/file_trees/default.json,sha256=ryUrEmQYE8B_WkzCoQLgmem3N9yNwMIWx9G8p3HfG9o,2310
|
|
133
133
|
zou/app/file_trees/simple.json,sha256=VBI43Z3rjQxtTpVCq3ktUgS0UB8x-aTowKL9LXuXCFI,3149
|
|
134
134
|
zou/app/indexer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -165,8 +165,8 @@ zou/app/models/preview_file.py,sha256=Ur45Wau2X3qyKULh04EUcMbnBmaQc8y4IMs5NgELiA
|
|
|
165
165
|
zou/app/models/project.py,sha256=qj5IR17Og6rioW2CoQOp7f76HZ2wcXOkq4bp9OXoeIo,8699
|
|
166
166
|
zou/app/models/project_status.py,sha256=pExaHH7x4Eu8xOqD3_mRRbMzjT2jJZ8rm-9jo7yUGXA,390
|
|
167
167
|
zou/app/models/schedule_item.py,sha256=coY5uDDuBoctaMICnfCzx4zT5om2E1uu4iq5MDWAPlY,1444
|
|
168
|
-
zou/app/models/search_filter.py,sha256=
|
|
169
|
-
zou/app/models/search_filter_group.py,sha256=
|
|
168
|
+
zou/app/models/search_filter.py,sha256=3xcFemJ9poIBAHNd50pv9U9eP_n74xJCxW2JBDcRuNo,1133
|
|
169
|
+
zou/app/models/search_filter_group.py,sha256=BWZR-Wkr7YzKRNU8GfIGlnz4AGZjD17_wK4tWwabNxQ,880
|
|
170
170
|
zou/app/models/serializer.py,sha256=VKN5hHJ6M_jsvrbKe5SonnTeg5dxXSYqb_4JDVWIQwA,1477
|
|
171
171
|
zou/app/models/software.py,sha256=3y9xEOS8BBxqgTaRrCaSYHaB6uOdJ88uU5i-cACoCSk,517
|
|
172
172
|
zou/app/models/status_automation.py,sha256=95c0lmOetujyGWViLd_qsR4GWPhrmlvi9ZfkC0x1NuM,1391
|
|
@@ -208,10 +208,10 @@ zou/app/services/shots_service.py,sha256=yrsv3DeSHM-x_8N7aPJ4V_SEXkiZmZlr3dKsFuH
|
|
|
208
208
|
zou/app/services/stats_service.py,sha256=cAlc92i9d6eYtsuwe3hYHYwdytg8KEMi1-TADfysJwM,11733
|
|
209
209
|
zou/app/services/status_automations_service.py,sha256=tVio7Sj7inhvKS4UOyRhcdpwr_KNP96hT1o0X7XcGF4,715
|
|
210
210
|
zou/app/services/sync_service.py,sha256=m2WCTPVOuLhg0ibrg_Y857OI-5ktSqSSkqAkdbqd0Dw,41667
|
|
211
|
-
zou/app/services/tasks_service.py,sha256=
|
|
211
|
+
zou/app/services/tasks_service.py,sha256=sSlvnUpCteSO2S9xmjsrdN85EgMNasp6bz5h3RFWBt4,67143
|
|
212
212
|
zou/app/services/telemetry_services.py,sha256=xQm1h1t_JxSFW59zQGf4NuNdUi1UfMa_6pQ-ytRbmGA,1029
|
|
213
213
|
zou/app/services/time_spents_service.py,sha256=GAI1bzjSSCY6-OzsmZCXaAmJYs88Vb8W_XNCF6HAPJk,14513
|
|
214
|
-
zou/app/services/user_service.py,sha256=
|
|
214
|
+
zou/app/services/user_service.py,sha256=DHTKJIxVMMI35-PJCBeZo8YRdj83CRvvg6VP4_JF8ak,46527
|
|
215
215
|
zou/app/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
216
216
|
zou/app/stores/auth_tokens_store.py,sha256=01hX-y7C3ngCfbAlPXxYQmGKJmNd_I0WG_I-a5Hu8Rw,1245
|
|
217
217
|
zou/app/stores/file_store.py,sha256=yLQDM6mNbj9oe0vsWdBqun7D8Dw-eSjD1yHCCftX0OI,4045
|
|
@@ -307,6 +307,7 @@ zou/migrations/versions/5b980f0dc365_add_comment_links.py,sha256=rh8ZtOkPNq3_RVf
|
|
|
307
307
|
zou/migrations/versions/5b9fd9ddfe43_add_homepage_and_contract_fields.py,sha256=KuGKtLnLiakCUaVGSXYdcpY8yp7ITTKbcq-50gkGEoE,1486
|
|
308
308
|
zou/migrations/versions/5c0498e264bc_add_slack_fields.py,sha256=9SapWaTXJUdpDLlJ8HzVMp1ty773UbvcL2tAjZXRep8,729
|
|
309
309
|
zou/migrations/versions/5e2ce62632a6_add_workflow_to_project.py,sha256=o-IN2JXCyU86JiSp4vURv5NNNaYv9uzdPB9sx3LtxVE,2826
|
|
310
|
+
zou/migrations/versions/680c64565f9d_for_searchfiltergroup_is_shared.py,sha256=RSq0FRpHEIGKLYi6FoV2u4MFXXtuSrn5YAgdUBgeYLk,859
|
|
310
311
|
zou/migrations/versions/693cc511d28d_add_taskstatus_priority.py,sha256=MpXSpaOcjiVD0a33Y5UEV-D2Ow0qro_76iVqjFjKztM,3113
|
|
311
312
|
zou/migrations/versions/6aa446ee4072_add_is_for_all_flage_to_playlists.py,sha256=jRhbypYC1GD5Juas9stGchsksL1ehPm0lhvf0PoVIpM,699
|
|
312
313
|
zou/migrations/versions/6bd3b102d61b_.py,sha256=3PGMfdyuZEwh3E_-0SzPd-ICa2vYMaOAdMayPgJqdFE,3402
|
|
@@ -362,6 +363,7 @@ zou/migrations/versions/b4dd0add5f79_.py,sha256=27RluntAv5oVA22JYue0k6EDf2SPvaej
|
|
|
362
363
|
zou/migrations/versions/b8c0a0f9d054_drop_task_status_is_reviewable.py,sha256=PFv1fCJFWSaBUKQwVZlteQNpt7w6ZutuyUVkORQ9oNk,760
|
|
363
364
|
zou/migrations/versions/b8ed0fb263f8_add_person_jti_and_jti_expiration_date.py,sha256=VHnwrcZ21t_rH0q-bDy1d3f_ts-KWq4kW-WdIeRKf6U,1409
|
|
364
365
|
zou/migrations/versions/b97a71306fc8_add_is_casting_standby_column_to_entity.py,sha256=AWyjFDKgu2zK6znts5Ycxo1EGVeRT09ia9e-UA3kUX8,717
|
|
366
|
+
zou/migrations/versions/be56dc0fb760_for_is_shared_disallow_nullable.py,sha256=D7y3Q_8t65Sn3S8efsqVvcdEX0JW4pmM42ZdD0deuu4,3127
|
|
365
367
|
zou/migrations/versions/bf1347acdee2_.py,sha256=wPktD1_oNaTJPXzY-_DR1Du129gKbZj9pUm_ZCI11Ys,1052
|
|
366
368
|
zou/migrations/versions/c49e41f1298b_add_previewbackground.py,sha256=7TOXMsEK9YWp5Io21wfyPg3Zl4-AIkC-CYM5e7glg4E,3803
|
|
367
369
|
zou/migrations/versions/c68c2a62cfac_add_mimetype_column_to_attachment.py,sha256=cEFnRMYHurag8D9-7ycE34gnVH5TdsDfRYQqs5v_g8M,727
|
|
@@ -400,9 +402,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
|
|
|
400
402
|
zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
|
|
401
403
|
zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
402
404
|
zou/utils/movie.py,sha256=u9LCEOvmkxwm-KiZ6jKNdB9LSC6XXUDwJpVx8LkDwJg,16416
|
|
403
|
-
zou-0.19.
|
|
404
|
-
zou-0.19.
|
|
405
|
-
zou-0.19.
|
|
406
|
-
zou-0.19.
|
|
407
|
-
zou-0.19.
|
|
408
|
-
zou-0.19.
|
|
405
|
+
zou-0.19.37.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
|
406
|
+
zou-0.19.37.dist-info/METADATA,sha256=6V-c5mwxrn0iiX31BxiOS5v08EELFdx-MDeQm10nIRA,6677
|
|
407
|
+
zou-0.19.37.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
408
|
+
zou-0.19.37.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
|
|
409
|
+
zou-0.19.37.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
|
|
410
|
+
zou-0.19.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|