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

fix: also re-attach a detached source to the TimedBelief object #745

Closed
wants to merge 1 commit into from

Conversation

nhoening
Copy link
Contributor

Just as in #709, which fixed the problem discussed in #683.
We saw a similar error happening in the real world now, only with the DataSource.

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
@nhoening nhoening added the Data label Jun 22, 2023
@nhoening nhoening modified the milestones: 0.15.0, 0.14.1 Jun 22, 2023
Copy link
Contributor

@victorgarcia98 victorgarcia98 left a comment

Choose a reason for hiding this comment

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

In case this workaround succeeds, I suggest moving this to a new function similar to this:

def reattach(obj : 'Base') -> 'Base':
    inspection_obj = inspect(obj, raiseerr=False)
    if inspection_obj and inspection_obj.detached:
        return obj.__class__.query.get(obj.id)

    return obj

@Flix6x
Copy link
Contributor

Flix6x commented Jun 23, 2023

I tried it, but alas it doesn't resolve the issue.

@Flix6x Flix6x closed this Jun 23, 2023
@nhoening
Copy link
Contributor Author

Do you have a reproducible situation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants