From 42432cf9f7e4345ccb2d96d6126b5e85ab3ac272 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 7 May 2018 14:10:00 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=92=D1=8B=D1=81=D1=82=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D0=BF=D1=80=D0=B5=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BA=20=D0=BA=D1=83=D1=80=D1=81=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- finance/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/finance/models.py b/finance/models.py index e824ea3..2edf8fe 100755 --- a/finance/models.py +++ b/finance/models.py @@ -17,7 +17,9 @@ logger_business_rules = logging.getLogger('business_rules') class Bill(models.Model): course_token = models.UUIDField(verbose_name="Токен курса", editable=False) user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name='Плательщик', related_name='bill_user') - opener = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name='Ответственный сотрудник', null=True) + opener = models.ForeignKey( + settings.AUTH_USER_MODEL, verbose_name='Ответственный сотрудник', null=True, blank=True, + on_delete=models.SET_NULL) comment = models.TextField(verbose_name='Комментарий продавца', help_text='Будет показано пользователю', blank=True, editable=False) description = models.TextField(verbose_name='Внутренняя заметка', blank=True) From 9e5f28060ebfecf3830dc433404df36ab9e534af Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 7 May 2018 14:13:06 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=92=D1=8B=D1=81=D1=82=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D0=BF=D1=80=D0=B5=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BA=20=D0=BA=D1=83=D1=80=D1=81=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- finance/migrations/0011_auto_20180507_1412.py | 22 +++++++++++++++++++ .../migrations/0014_auto_20180507_1412.py | 20 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 finance/migrations/0011_auto_20180507_1412.py create mode 100644 progress/migrations/0014_auto_20180507_1412.py diff --git a/finance/migrations/0011_auto_20180507_1412.py b/finance/migrations/0011_auto_20180507_1412.py new file mode 100644 index 0000000..e11255a --- /dev/null +++ b/finance/migrations/0011_auto_20180507_1412.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2018-05-07 14:12 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('finance', '0010_auto_20180412_1628'), + ] + + operations = [ + migrations.AlterField( + model_name='bill', + name='opener', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Ответственный сотрудник'), + ), + ] diff --git a/progress/migrations/0014_auto_20180507_1412.py b/progress/migrations/0014_auto_20180507_1412.py new file mode 100644 index 0000000..07cf083 --- /dev/null +++ b/progress/migrations/0014_auto_20180507_1412.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2018-05-07 14:12 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('progress', '0013_progresslesson_dif_check_timestamps'), + ] + + operations = [ + migrations.AlterField( + model_name='progresslesson', + name='last_update', + field=models.DateTimeField(auto_now_add=True, verbose_name='Дата последней сдачи'), + ), + ]