Skip to content
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

Merged
merged 10 commits into from
Aug 21, 2020
Merged

Support to fix admin issue 42 #253

merged 10 commits into from
Aug 21, 2020

Conversation

AmandaBirmingham
Copy link
Collaborator

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.

Copy link
Member

@wasade wasade left a 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
Copy link
Member

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?

Copy link
Member

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?

Copy link
Member

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)

Copy link
Collaborator Author

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 ...

@AmandaBirmingham
Copy link
Collaborator Author

@wasade I think I've covered your accepted change; if so, can you accept?

@wasade wasade merged commit 7c82acb into master Aug 21, 2020
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.

None yet

2 participants