Skip to content
Snippets Groups Projects
Commit 25905bed authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

allow AK slots without rooms

parent 11d84b16
No related branches found
No related tags found
No related merge requests found
# Generated by Django 2.2.6 on 2019-10-18 23:15
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0015_ak_present_field'),
]
operations = [
migrations.AlterField(
model_name='akslot',
name='room',
field=models.ForeignKey(blank=True, help_text='Room the AK will take place in', null=True,
on_delete=django.db.models.deletion.SET_NULL, to='AKModel.Room',
verbose_name='Room'),
),
]
...@@ -135,7 +135,8 @@ class AK(models.Model): ...@@ -135,7 +135,8 @@ class AK(models.Model):
reso = models.BooleanField(verbose_name=_('Resolution Intention'), default=False, reso = models.BooleanField(verbose_name=_('Resolution Intention'), default=False,
help_text=_('Intends to submit a resolution')) help_text=_('Intends to submit a resolution'))
present = models.BooleanField(verbose_name=_("Present this AK"), null=True, help_text=_("Present results of this AK")) present = models.BooleanField(verbose_name=_("Present this AK"), null=True,
help_text=_("Present results of this AK"))
requirements = models.ManyToManyField(to=AKRequirement, blank=True, verbose_name=_('Requirements'), requirements = models.ManyToManyField(to=AKRequirement, blank=True, verbose_name=_('Requirements'),
help_text=_("AK's Requirements")) help_text=_("AK's Requirements"))
...@@ -199,7 +200,7 @@ class AKSlot(models.Model): ...@@ -199,7 +200,7 @@ class AKSlot(models.Model):
""" An AK Mapping matches an AK to a room during a certain time. """ An AK Mapping matches an AK to a room during a certain time.
""" """
ak = models.ForeignKey(to=AK, on_delete=models.CASCADE, verbose_name=_('AK'), help_text=_('AK being mapped')) ak = models.ForeignKey(to=AK, on_delete=models.CASCADE, verbose_name=_('AK'), help_text=_('AK being mapped'))
room = models.ForeignKey(to=Room, null=True, on_delete=models.SET_NULL, verbose_name=_('Room'), room = models.ForeignKey(to=Room, blank=True, null=True, on_delete=models.SET_NULL, verbose_name=_('Room'),
help_text=_('Room the AK will take place in')) help_text=_('Room the AK will take place in'))
start = models.DateTimeField(verbose_name=_('Slot Begin'), help_text=_('Time and date the slot begins')) start = models.DateTimeField(verbose_name=_('Slot Begin'), help_text=_('Time and date the slot begins'))
duration = models.DecimalField(max_digits=4, decimal_places=2, default=2, verbose_name=_('Duration'), duration = models.DecimalField(max_digits=4, decimal_places=2, default=2, verbose_name=_('Duration'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment