-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cherijs develop #29
Conversation
- 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
…m server, and we are updating pass.
…eted from server, and we are updating pass." This reverts commit 62cd074.
…ken with 164 chars
@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>" |
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.
👍
elif 'warning' in status: | ||
status = 'warning' | ||
|
||
log.created_at = datetime.datetime.strptime(timestamp_str, "%Y-%m-%d %H:%M:%S %z") |
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.
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()
?
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.
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.
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.
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).
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.
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.
😅 time for another coffee I guess
replaces #22 & #23