version bump 2.2.3, minor fixes

This commit is contained in:
Xavier Fiechter 2024-10-09 14:03:00 +02:00
parent 8eca90567d
commit 7a79c66f09
5 changed files with 25 additions and 11 deletions

View file

@ -278,8 +278,8 @@ class HistoricalPrice(models.Model):
class Meta:
ordering = ['-timestamp']
@classmethod
def get_or_create_from_api(user, cls, timestamp=-1):
@classmethod
def get_or_create_from_api(cls, user=None, timestamp=-1):
if timestamp == -1:
current_datetime = datetime.datetime.now()
timestamp = int(current_datetime.timestamp())

View file

@ -5,11 +5,21 @@ from finances.models import HistoricalPrice
@receiver(user_logged_in)
def perform_tasks_on_login(sender, user, request, **kwargs):
if user.profile.update_utxo_on_login:
from finances.tasks import check_all_outputs
from labelbase.models import Label
check_all_outputs(user.id)
if Label.objects.filter(labelbase__user_id=user.id).exists():
messages.info(request, "<strong>Sync in progress:</strong> We are checking your unspent transaction outputs now.")
try:
if user.profile.update_utxo_on_login:
from finances.tasks import check_all_outputs
from labelbase.models import Label
check_all_outputs(user.id)
if Label.objects.filter(labelbase__user_id=user.id).exists():
messages.info(request, (
"<strong>Sync in progress:</strong> "
"We are checking your unspent transaction outputs now."
))
except Exception as ex:
messages.info(request, (
"<strong>Oups:</strong> "
f"{ex}"
))
# Store nearest price information.
HistoricalPrice.get_or_create_from_api(user, -1)

View file

@ -54,7 +54,7 @@ sentry_sdk.init(
traces_sample_rate=1.0,
send_default_pii=True, # must be "True" here, will skip or omit in `before_send` callback
)
sentry_sdk.set_tag("version", "2.2.2")
sentry_sdk.set_tag("version", "2.2.3")
LOGGING = {
@ -103,8 +103,11 @@ INSTALLED_APPS = [
"django_otp",
"django_otp.plugins.otp_static",
"django_otp.plugins.otp_totp",
"labelbase",
"userprofile",
"notifications",
"bootstrapform",
"cryptography",
"rest_framework",
@ -119,6 +122,7 @@ INSTALLED_APPS = [
"statusapp",
"attachments",
"messages_extends",
]

View file

@ -59,7 +59,7 @@
</ul>
</div>
<div class="my-2 text-center"><small>
<a class="text-600 me-1 termslink" href="JavaScript:void(0);" onclick="window.location='{% url 'privacy_policy' %}';">Privacy Policy</a><a class="text-600 mx-1 termslink" href="JavaScript:void(0);" onclick="window.location='{% url 'terms' %}';">Terms</a><a class="text-600 mx-1 termslink">v2.2.2</a></small>
<a class="text-600 me-1 termslink" href="JavaScript:void(0);" onclick="window.location='{% url 'privacy_policy' %}';">Privacy Policy</a><a class="text-600 mx-1 termslink" href="JavaScript:void(0);" onclick="window.location='{% url 'terms' %}';">Terms</a><a class="text-600 mx-1 termslink">v2.2.3</a></small>
</div>
</div>
</div>

View file

@ -2,6 +2,6 @@
{% load i18n %}
{% block content %}
<h1>{% block title %}{% trans "Logged Out" %}{% endblock %}</h1>
<h2 style="padding-top: 1em;">{% block title %}{% trans "Logged Out" %}{% endblock %}</h2>
<p>{% trans "See you around!" %}</p>
{% endblock %}