updates wording and fixes get or create logic

This commit is contained in:
Mouse Reeve 2024-01-02 13:28:25 -08:00
parent 8be9e91d21
commit 193a1c7d54
3 changed files with 5 additions and 3 deletions

View file

@ -1 +1 @@
0.7.1
0.6.1

View file

@ -8,14 +8,14 @@
<p class="pr-2">
{% blocktrans trimmed with current=current_version available=available_version %}
Check for available version updates? (Recommended)
Would you like to automatically check for new BookWyrm releases? (recommended)
{% endblocktrans %}
</p>
{{ schedule_form.every.as_hidden }}
{{ schedule_form.period.as_hidden }}
<button class="button is-small" type="submit">{% trans "Confirm" %}</button>
<button class="button is-small" type="submit">{% trans "Schedule checks" %}</button>
</form>
{% endblock %}

View file

@ -77,6 +77,8 @@ class Dashboard(View):
def post(self, request):
"""Create a schedule task to check for updates"""
schedule_form = forms.IntervalScheduleForm(request.POST)
if not schedule_form.is_valid():
raise schedule_form.ValidationError(schedule_form.errors)
with transaction.atomic():
schedule, _ = IntervalSchedule.objects.get_or_create(