mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 02:51:13 +00:00
updates wording and fixes get or create logic
This commit is contained in:
parent
8be9e91d21
commit
193a1c7d54
3 changed files with 5 additions and 3 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
0.7.1
|
0.6.1
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
|
|
||||||
<p class="pr-2">
|
<p class="pr-2">
|
||||||
{% blocktrans trimmed with current=current_version available=available_version %}
|
{% 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 %}
|
{% endblocktrans %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{ schedule_form.every.as_hidden }}
|
{{ schedule_form.every.as_hidden }}
|
||||||
{{ schedule_form.period.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>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -77,6 +77,8 @@ class Dashboard(View):
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
"""Create a schedule task to check for updates"""
|
"""Create a schedule task to check for updates"""
|
||||||
schedule_form = forms.IntervalScheduleForm(request.POST)
|
schedule_form = forms.IntervalScheduleForm(request.POST)
|
||||||
|
if not schedule_form.is_valid():
|
||||||
|
raise schedule_form.ValidationError(schedule_form.errors)
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
schedule, _ = IntervalSchedule.objects.get_or_create(
|
schedule, _ = IntervalSchedule.objects.get_or_create(
|
||||||
|
|
Loading…
Reference in a new issue