-
Notifications
You must be signed in to change notification settings - Fork 2
Description
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_providedscore range is added to the score set ranges attribute - The
investigator_providedscore range has itsprimaryattribute set toTrueby an admin user - A user updates the
investigator_providedscore range, thereby overwriting the setprimaryattribute
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.