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

Cherijs develop #29

Merged
merged 23 commits into from
Jan 23, 2024
Merged

Cherijs develop #29

merged 23 commits into from
Jan 23, 2024

Conversation

patroqueeet
Copy link
Collaborator

@patroqueeet patroqueeet commented Jan 22, 2024

replaces #22 & #23

NachE and others added 23 commits May 25, 2023 17:33
- deprecate cert based authentication for APNS

- replace `pyAPNS2` with `aioapns` to enable Django>=4.0 compatibility and resolve unmaintained `hyper` dependency
- increase minimum Python version to 3.6

- sumer time switch bugfix
…ead.

if code is executing in a non-main thread: By default, the main thread in Python has an event loop set up automatically. However, if the code is running in a separate thread, we need to manually create and set up an event loop for that thread.
Create event loop, if code is executing in non-main thread.
Create event loop, if code is executing in non-main thread.
Starting from Python 3, the __str__ method was introduced as a replacement for __unicode__ to provide a string representation of an object.
# Conflicts:
#	django_walletpass/admin.py
#	django_walletpass/models.py
…//xxxx/passes/) encountered error: Unexpected response code 404
…eted from server, and we are updating pass."

This reverts commit 62cd074.
@patroqueeet
Copy link
Collaborator Author

@alexandernst pls review

if obj.data:
return format_html(
Template(
"{% load static %}<a href='{url}' alt='{title}'><img src='{% static 'admin/passbook_icon.svg' %}'/></a>"
Copy link
Member

Choose a reason for hiding this comment

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

👍

elif 'warning' in status:
status = 'warning'

log.created_at = datetime.datetime.strptime(timestamp_str, "%Y-%m-%d %H:%M:%S %z")
Copy link
Member

Choose a reason for hiding this comment

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

This will crash if timestamp_str doesn't have the expected format (which will happen if the code falls through the final else). Maybe default to now()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good morning, the final else will trigger return. in that case timestamp_str wouldn't even be defined. in case timestamp_str changes and does not match the expected pattern anymore, we should get noticed (exception?) and not fill it with a default value which would result in the data speaking non-exact facts.

Copy link
Member

Choose a reason for hiding this comment

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

ohh, true! hmmm... 🤔... maybe add a new TextField and store the raw received message? This way we won't loose any messages (that might be useful, but we didn't have the right pattern match for them).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

😅 time for another coffee I guess

@alexandernst alexandernst merged commit 2e95c4c into Develatio:master Jan 23, 2024
3 checks passed
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.

4 participants