Fix migrations
This commit is contained in:
18
hotels/migrations/0004_reservation_fraud_checked.py
Normal file
18
hotels/migrations/0004_reservation_fraud_checked.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.1.4 on 2025-02-01 09:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('hotels', '0003_rename_external_id_hotel_external_id_pms_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='reservation',
|
||||
name='fraud_checked',
|
||||
field=models.BooleanField(db_index=True, default=False, verbose_name='Проверено на несоответствия'),
|
||||
),
|
||||
]
|
||||
@@ -116,6 +116,7 @@ class Reservation(models.Model):
|
||||
status = models.CharField(max_length=50, verbose_name="Статус")
|
||||
price = models.DecimalField(max_digits=10, decimal_places=2, null=True, blank=True, verbose_name="Цена")
|
||||
discount = models.DecimalField(max_digits=10, decimal_places=2, null=True, blank=True, verbose_name="Скидка")
|
||||
fraud_checked = models.BooleanField(default=False, verbose_name="Проверено на несоответствия", db_index=True)
|
||||
|
||||
def clean(self):
|
||||
if self.check_out and self.check_in and self.check_out <= self.check_in:
|
||||
|
||||
Reference in New Issue
Block a user