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 for part-id fallback #64

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Support for part-id fallback #64

merged 1 commit into from
Dec 15, 2023

Conversation

afkiwers
Copy link
Owner

added support for part-id fallback. if activated it will also look at part name. This would cover the case where users don't have inventree ids but MPNs. Those could then be used to find the right part.

fixes: #63

added support for part-id fallback. if activated it will also look at part name.
This would cover the case where users don't have inventree ids but MPNs.
Those could then be used to find the right part.
@afkiwers afkiwers merged commit 3394d77 into main Dec 15, 2023
2 checks passed
@afkiwers afkiwers deleted the add_fallback_for_part_id branch December 15, 2023 01:25
# try also the part name if user wants it
if self.get_setting('IMPORT_INVENTREE_ID_FALLBACK', None):
try:
part = Part.objects.get(name=inventree_part_id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't inventry_part_id be updated here since it may be used for PartAttachment below?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or use part=part below.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, thanks

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

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.

fallback for non-numeric or numeric values that don't match as a part-id
2 participants