-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support to fix admin issue 42 #253
Conversation
…ple_time, not lack of sample site, because even collected environmental samples do not have a site.
…ple_time, not lack of sample site, because even collected environmental samples do not have a site.
…n in retrieve_diagnostics_by_barcode
…e-api into admin_issue_42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am +1 on this. Would it be possible to add a slight clarification for the kit UUID comment to note it's the PK of ag.ag_kit
?
# in has been used to open an AGP account; in this case, we can get | ||
# an account id and a kit id but NOT a source id. | ||
# Even if there is no such account association, we can still get | ||
# the (official, UUID) kit id if this is an AGP kit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is returning barcodes.kit.kit_uuid
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see, the UUID reference here is to ag.ag_kit.ag_kit_id
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(for clarify, the former refers to the UUID placed on the outside of the physical kit someone receives)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments modified. I can't help feeling that there are waaaay too many kinds of kit ids floating around ... for example, it is very confusing to me that the "kit_id" used in ag_kit_barcodes.ag_kit_id is a UUID (presumably from the ag.ag_kits table, although I don't see a foreign key relation ...?) but the "kit_id" used in ag.account.created_with_kit_id is an external-user-facing string like 'ju-gtbfd' (I think this matches to ag.ag_kit.supplied_kit_id, although, again, I don't see a foreign key relation.) The "kit_id" in barcodes.barcode.kit_id is also this external-user-facing string, but the same table also has a kit_uuid ... Ohhhh, my head ...
@wasade I think I've covered your accepted change; if so, can you accept? |
Primarily extends admin_repo.py's _get_ids_relevant_to_barcode to identify cases where barcode is not attached to a source but IS associated with an account in the sense that it is part of a kit that has been used to set up an account; this case will get (only) the 'no-associated-source' warning in admin interface as part of forthcoming issue 42 fix. Extends tests to separately exercise each of the cases that will lead to different warnings in admin interface.