Skip to content
Snippets Groups Projects
Commit 7e59f87f authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Story LSMR-13: Fixed models errors

parent 036530f8
No related branches found
No related tags found
1 merge request!87Lsmr epic
......@@ -174,23 +174,23 @@ class Project(UserDefinedCommon):
class RunSet(UserDefinedCommon):
generator_parameters_doc = JSONField()
generator_template = ForeignKey('GeneratorTemplate', on_delete=SET_NULL)
generator_template = ForeignKey('GeneratorTemplate', on_delete=SET_NULL, null=True)
project = ForeignKey('Project', related_name="run_sets", on_delete=CASCADE)
class RunBlueprint(UserDefinedCommon):
requirements_doc = JSONField()
copies = ForeignKey('RunBlueprint', related_name="copied_from", on_delete=SET_NULL)
copies = ForeignKey('RunBlueprint', related_name="copied_from", on_delete=SET_NULL, null=True)
copy_reason = CharField(max_length=30,
choices=
[i for i in CopyReasonChoice])
[(item.name, item.value) for item in CopyReasonChoice])
generator_param = CharField(max_length=200) # todo: check if the field size is good enough
run_set = ForeignKey(RunSet, related_name='run_blueprints', on_delete=CASCADE)
generator_source = ForeignKey(RunSet, on_delete=SET_NULL)
generator_source = ForeignKey(RunSet, on_delete=SET_NULL, null=True)
class Run(SystemDefinedCommon):
requirements_doc = JSONField()
do_cancel = BooleanField()
template = ForeignKey(RunTemplate, on_delete=SET_NULL)
blueprint = ForeignKey(RunBlueprint, related_name='related_runs')
template = ForeignKey(RunTemplate, on_delete=SET_NULL, null=True)
blueprint = ForeignKey(RunBlueprint, related_name='related_runs', on_delete=CASCADE)
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