File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ class Object(db.Model):
58
58
share_3rd_party = db .Column (db .Boolean , nullable = False )
59
59
60
60
upload_count = column_property (
61
- select ([func .count (distinct (ObjectPermission .related_user_id ))]).where (
61
+ select ([func .count (distinct (ObjectPermission .related_user_id ))])
62
+ .where (
62
63
and_ (
63
64
ObjectPermission .object_id == id ,
64
65
ObjectPermission .reason_type == AccessType .ADDED ,
65
66
)
66
- ),
67
+ )
68
+ .scalar_subquery (),
67
69
deferred = True ,
68
70
)
69
71
@@ -105,7 +107,7 @@ class Object(db.Model):
105
107
"User" ,
106
108
secondary = "comment" ,
107
109
back_populates = "commented_objects" ,
108
- passive_deletes = True ,
110
+ viewonly = True ,
109
111
)
110
112
111
113
shares = db .relationship (
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ class User(db.Model):
68
68
"Object" ,
69
69
secondary = "comment" ,
70
70
back_populates = "comment_authors" ,
71
- passive_deletes = True ,
71
+ viewonly = True ,
72
72
)
73
73
74
74
comments = db .relationship (
Original file line number Diff line number Diff line change 1
1
Werkzeug == 3.0.6
2
2
gunicorn == 22.0.0
3
- alembic == 1.4.2
3
+ alembic == 1.14.0
4
4
Flask == 2.3.3
5
- Flask-SQLAlchemy == 2.5.1
6
- Flask-Migrate == 3.1.0
7
- SQLAlchemy == 1.3.18
5
+ Flask-SQLAlchemy == 3.0.5
6
+ Flask-Migrate == 4.0.7
7
+ SQLAlchemy == 1.4.54
8
8
marshmallow == 3.20.2
9
- psycopg2-binary == 2.9.9
9
+ psycopg2-binary == 2.9.10
10
10
requests == 2.32.0
11
11
apispec [marshmallow,yaml ]== 6.4.0
12
12
bcrypt == 3.1.4
You can’t perform that action at this time.
0 commit comments