Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

2022 #7 #10, User can't define past date & 5 min or less before end of voting for sendout module & Timestampz #35

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

janczarny
Copy link

  • Added displaying error msg in sendout

@janczarny janczarny linked an issue Aug 7, 2022 that may be closed by this pull request
@janczarny janczarny changed the title #7, User can't define past date & 5 min or less before end of voting for sendout module 2022 #7, User can't define past date & 5 min or less before end of voting for sendout module Aug 7, 2022
- planned_start_sending
- closes_on_date
@karolba
Copy link
Contributor

karolba commented Aug 9, 2022

Kod się wywala przy próbie dodania głosowania - ale zgaduję że dlatego że zależy od #38

Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]: [2022-08-09 20:51:37,460] ERROR in app: Exception on /admin/addpoll [POST]
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]: Traceback (most recent call last):
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 2447, in wsgi_app
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     response = self.full_dispatch_request()
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1952, in full_dispatch_request
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     rv = self.handle_user_exception(e)
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1821, in handle_user_exception
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     reraise(exc_type, exc_value, tb)
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     raise value
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     rv = self.dispatch_request()
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     return self.view_functions[rule.endpoint](**req.view_args)
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/usr/lib/python3/dist-packages/flask_login/utils.py", line 272, in decorated_view
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     return func(*args, **kwargs)
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/opt/sw/sw-admin/sw_admin.py", line 149, in admin_addpoll_post
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     db_execute('insert into polls(name, options, choice_type, visibility, possible_recipients, \
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:   File "/opt/sw/sw-admin/sw_admin.py", line 53, in db_execute
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]:     cursor.execute(query, args)
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]: psycopg2.errors.NotNullViolation: null value in column "planned_start_sending" of relation "polls" violates not-null constraint
Aug 09 20:51:37 system-wyborczy-development sw-admin[5245]: DETAIL:  Failing row contains (9, kjdkjashkdsa, [{"name": "asddsa", "description": "asddsa"}, {"name": "asdsa", ..., multiple-choice, private, ["252726@student.pwr.edu.pl"], [], [], 2022-08-11 11:33:00+00, f, 1, For English, scroll down.

Datetime Fix
Schema Fix (Null is default  for planned_start_sending)
@janczarny
Copy link
Author

Tak, to zależy od #38

@janczarny
Copy link
Author

Poszedł merge, więc bug to historia

@karolba
Copy link
Contributor

karolba commented Aug 9, 2022

Poszedł merge, więc bug to historia

to w takim razie myślisz można zamknąć #38? zrealizujmy oba w jednym

@janczarny
Copy link
Author

Tak, bo Merged. Zamknięty #38

@janczarny janczarny linked an issue Aug 9, 2022 that may be closed by this pull request
@janczarny janczarny changed the title 2022 #7, User can't define past date & 5 min or less before end of voting for sendout module 2022 #7 #10, User can't define past date & 5 min or less before end of voting for sendout module & Timestampz Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants