Skip to content

Add Design.field attribute#127

Merged
albireox merged 2 commits into
mainfrom
albireox/design-field
Jul 21, 2022
Merged

Add Design.field attribute#127
albireox merged 2 commits into
mainfrom
albireox/design-field

Conversation

@albireox
Copy link
Copy Markdown
Member

Restores the Design.field reference using a property with a custom query instead of a Peewee ForeignKeyField.

The logic is:

  • If $RS_VERSION is not defined, fails.
  • If there are multiple fields associated with a design for the same $RS_VERSION, fails.
  • If there is only one field associated with a design for the RS version, return that one.
  • If there are no fields associated with a design for the current RS version, removes the RS field condition and removes the first field (should apply only to commissioning designs without an associated RS run).

@johndonor3
Copy link
Copy Markdown
Contributor

Looks good to me!

@albireox albireox merged commit 50cee13 into main Jul 21, 2022
@albireox albireox deleted the albireox/design-field branch July 21, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants