-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix more sqlalchemy #1417
Open
terrazoon
wants to merge
111
commits into
main
Choose a base branch
from
clean_up_sqlalchemy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix more sqlalchemy #1417
Changes from 83 commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
6d8fdab
fix more sqlalchemy
7b83ea3
fix more
310386a
hmmm
5276ba4
hmmm
441b75d
hmmm
b708498
hmmm
f16c814
revert one test
0177fdc
hmmm
8c7cb44
more tests
b0bf042
more
704fff7
more
8f211cc
more
d1ebcba
more
1311598
more
3673a92
fix more
ee00100
fix tests
5c6a5f9
fix tests
5f4da49
more
98ee86f
more
703a29f
more
1f0a64d
more
555cf5d
more
3eadfb2
fix style
bc4d4c9
more
5b667a1
more
6c44f81
more
2eb692a
more
4ef1847
fix permission_dao
3168f28
more
4f3b99b
more
c77382c
more
da57887
fix
2c3c107
revert bad changes
ce42803
fix
92bf9c5
more
25d2901
try fixing pagination
4539e5c
try fixing pagination
71e4794
try fixing pagination
552d464
try fixing pagination
e7abb06
try fixing pagination
83a7df6
try fixing pagination
c3de127
try fixing pagination
d513c5e
debug
14bfcd3
debug
d2d5fa7
fix
c92a760
fix
4078a7e
fix
53f3948
fix
ce5b9cf
fix
38e7672
fix
43a1969
fix
2abb14d
fix
84ebf11
fix
27c9885
fix
f9cf3f3
fix scheduled tasks
b33e2ca
fix scheduled tasks
9d257eb
fix scheduled tasks
c45a5a3
fix
8945f84
fix
4d544ef
fix
bfcc8ac
fix
67aa1e6
fix
0d44f29
fix
32e73f6
revert
63ff83b
fix
a53c067
uploads
0c9995d
uploads
b388d9f
fix notifications
76dc06c
fix notifications
8b74448
fix notifications
331f0eb
fix notifications
fd7b3b9
fix notifications
a3658ce
fix notifications
4a03f5b
remove print statements
1a1de39
change querie to stmt
d283613
code review feedback and merge from main
6e23d0b
merge from main
9e5b21e
merge from main
8cd0bd8
code review feedback
096ec68
code review feedback
e4782e4
code review feedback
f4ce3d1
code review feedback
6591693
code review feedback
3388371
fix filter_bys
83193c2
fix fragile filter approach
db16f94
noqa the x == False for sqlalchemy
772f78d
noqa the x == False for sqlalchemy
5f9b4bc
noqa the x == False for sqlalchemy
67d8974
noqa the x == False for sqlalchemy
440bf85
noqa the x == False for sqlalchemy
c29fb78
noqa the x == False for sqlalchemy
9954ac4
noqa the x == False for sqlalchemy
605782c
noqa the x == False for sqlalchemy
bb1d81b
noqa the x == False for sqlalchemy
5a94229
noqa the x == False for sqlalchemy
8f572bb
noqa the x == False for sqlalchemy
f809a06
noqa the x == False for sqlalchemy
a77343e
noqa the x == False for sqlalchemy
3c0621f
more code review feedback
d8b7b06
merge from main
4ac7c74
merge from main
942b4a3
fix
82aebcd
fix
16286eb
fix
feeef72
fix
2878fb0
fix enum
bf497d8
try again
3da4755
try again
4e3f899
try again
71f682a
try again
c7cb377
try again
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
from sqlalchemy import select | ||
|
||
from app import db | ||
from app.dao.dao_utils import autocommit | ||
from app.models import EmailBranding | ||
|
||
|
||
def dao_get_email_branding_options(): | ||
return EmailBranding.query.all() | ||
return db.session.execute(select(EmailBranding)).scalars().all() | ||
|
||
|
||
def dao_get_email_branding_by_id(email_branding_id): | ||
return EmailBranding.query.filter_by(id=email_branding_id).one() | ||
return ( | ||
db.session.execute(select(EmailBranding).filter_by(id=email_branding_id)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
.scalars() | ||
.one() | ||
) | ||
|
||
|
||
def dao_get_email_branding_by_name(email_branding_name): | ||
return EmailBranding.query.filter_by(name=email_branding_name).first() | ||
return ( | ||
db.session.execute(select(EmailBranding).filter_by(name=email_branding_name)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
.scalars() | ||
.first() | ||
) | ||
|
||
|
||
@autocommit | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a
.filter()
rather than a.where()
?