Skip to content
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

532 UI restyle consent action on digitize before uploading sketchmaps #535

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matthiasschaub
Copy link
Collaborator

No description provided.

Values of the hidden form field depend on the selected upload button and will always be sent.
Values will be "True" or "False"

Needed new logic in routes.py to read out the consent value!

#532

Refs: #532
Comment on lines +213 to +215
consent: bool = False
if request.form["consent"] is "True":
consent = True
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
consent: bool = False
if request.form["consent"] is "True":
consent = True
if request.form["consent"] == "True":
consent = True
else:
consent = False

For string comparison, use == instead of is. The latter is only used for comparison of bool and None (E.g. consent is None).

The if-else is just personal preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui: restyle consent action on /digitize before uploading sketchmaps
2 participants