cmsmanage/rentals/migrations/0003_lockerinfo_reserved_and_more.py

30 lines
844 B
Python

# Generated by Django 4.0.2 on 2022-03-16 01:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("rentals", "0002_lockerinfo_notes"),
]
operations = [
migrations.AddField(
model_name="lockerinfo",
name="reserved",
field=models.BooleanField(
default=False,
help_text="Locker is reserved for MakerSpace use, and cannot be rented.",
),
),
migrations.AddConstraint(
model_name="lockerinfo",
constraint=models.CheckConstraint(
check=models.Q(
("reserved", False), ("renter__isnull", True), _connector="OR"
),
name="locker_not_reserved_and_rented",
),
),
]