Skip to content

User Submitted Ranges would Overwrite Primary Range Flags #534

@bencap

Description

@bencap

The implementation of VariantEffect/mavedb-ui#500 on the API side of things added a new range property primary, set in a new Admin class on each score range, that controls which range in a set of score ranges should be considered the default range for display for a given score set.

The primary issue with the implementation as written is the following event sequence:

  • A new investigator_provided score range is added to the score set ranges attribute
  • The investigator_provided score range has its primary attribute set to True by an admin user
  • A user updates the investigator_provided score range, thereby overwriting the set primary attribute

Note that a user currently might also do this unintentionally with the whole range object, see #533. Additionally, a well meaning user wouldn't even be able to retain the primary attribute on updated score ranges because of the Admin only nature of the property.

Really, this might be more of a symptom of #533: Investigator ranges are the default primary option, so they never need their primary attribute set to True (it will be set automatically in the case of other ranges not being marked as primary). If another range is set to primary we simply don't want the user to have the ability to override it by submitting a new range object.

Metadata

Metadata

Assignees

Labels

app: backendTask implementation touches the backendtype: bugSomething isn't workingtype: enhancementEnhancement to an existing feature

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions