Skip to content
Snippets Groups Projects
Commit ed3972ad authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

TMSS-241: fix nullable cycles in project model

parent 72ca76fc
No related branches found
No related tags found
1 merge request!184Resolve TMSS-241
# Generated by Django 3.0.6 on 2020-07-14 21:21
# Generated by Django 3.0.6 on 2020-07-14 21:50
from django.conf import settings
import django.contrib.postgres.fields
......@@ -1019,7 +1019,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='project',
name='cycles',
field=models.ManyToManyField(help_text='Cycles to which this project belongs (NULLable).', related_name='projects', to='tmssapp.Cycle'),
field=models.ManyToManyField(blank=True, help_text='Cycles to which this project belongs (NULLable).', related_name='projects', to='tmssapp.Cycle'),
),
migrations.AddField(
model_name='project',
......
......@@ -276,7 +276,7 @@ class Cycle(NamedCommonPK):
class Project(NamedCommonPK):
cycles = ManyToManyField('Cycle', related_name='projects', help_text='Cycles to which this project belongs (NULLable).')
cycles = ManyToManyField('Cycle', blank=True, related_name='projects', help_text='Cycles to which this project belongs (NULLable).')
priority_rank = FloatField(null=False, help_text='Priority of this project w.r.t. other projects. Projects can interrupt observations of lower-priority projects.') # todo: add if needed: validators=[MinValueValidator(0.0), MaxValueValidator(1.0)]
trigger_priority = IntegerField(default=1000, help_text='Priority of this project w.r.t. triggers.') # todo: verify meaning and add to help_text: "Triggers with higher priority than this threshold can interrupt observations of projects."
can_trigger = BooleanField(default=False, help_text='True if this project is allowed to supply observation requests on the fly, possibly interrupting currently running observations (responsive telescope).')
......
......@@ -141,7 +141,8 @@ class TMSSRESTTestDataCreator():
"priority_rank": 1.0,
"trigger_priority": 1000,
"can_trigger": False,
"private_data": True}
"private_data": True,
"cycles": []}
def ResourceUnit(self):
return {
......
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