mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Fix #273 -- Set correct all order expiry times to the end of the day
This commit is contained in:
23
src/pretix/base/migrations/0041_auto_20161019_1757.py
Normal file
23
src/pretix/base/migrations/0041_auto_20161019_1757.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.2 on 2016-10-19 17:57
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def forwards(apps, schema_editor):
|
||||
Order = apps.get_model('pretixbase', 'Order')
|
||||
for order in Order.objects.all():
|
||||
order.expires = order.expires.replace(hour=23, minute=59, second=59)
|
||||
order.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pretixbase', '0040_u2fdevice'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(forwards)
|
||||
]
|
||||
Reference in New Issue
Block a user