[Harvester] Set crystal UUID via set_id so get_id() returns it correctly#1640
Open
jbflo wants to merge 2 commits into
Open
[Harvester] Set crystal UUID via set_id so get_id() returns it correctly#1640jbflo wants to merge 2 commits into
jbflo wants to merge 2 commits into
Conversation
jbflo
force-pushed
the
jb-fix-harvester2
branch
2 times, most recently
from
July 16, 2026 15:34
c7dd05c to
2af998e
Compare
|
|
||
| # Enrich sample object in MXCuBE | ||
| sample.id = x_tal_uuid | ||
| sample._id = x_tal_uuid |
Member
There was a problem hiding this comment.
Its a bit odd to set _id from outside of sample, is there no set_id or similar that can be used ?
Member
Author
There was a problem hiding this comment.
Its a bit odd to set
_idfrom outside of sample, is there noset_idor similar that can be used ?
pragmatic but accessing a protected attribute from outside the class is odd i aggreed.
But I checked — there's no set_id(). The options are:
Keep the pragmatic fix or
Add set_id() to Component.py — cleanest, fixes the root cause:
def set_id(self, id):
self._id = id
Member
There was a problem hiding this comment.
Ok, go AI go, do the fix ;)
Member
Author
There was a problem hiding this comment.
Ok, go AI go, do the fix ;)
fixed ! 🤖
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sample.id = x_tal_uuid was setting a dynamic attribute, causing get_id() to return None since it reads self._id
Fix: Add public set_id() to Component
use sample.set_id(x_tal_uuid) so get_id() returns the crystal UUID consistently