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

[POC][IGNORE] Relation Data split from Event Handlers, accessible as dict #122

Conversation

juditnovak
Copy link
Contributor

No description provided.

@juditnovak juditnovak changed the title [POC][IGNORE] Relation Data as dict [POC][IGNORE] Relation Data split from Event Handlers, accessible as dict Feb 21, 2024
@juditnovak juditnovak force-pushed the poc_judit_dp_libs_experiment_events_split_dict branch 3 times, most recently from b9e0eed to 459c737 Compare February 21, 2024 09:28
@juditnovak juditnovak force-pushed the poc_judit_dp_libs_experiment_events_split_dict branch from 459c737 to 8a4b52f Compare February 21, 2024 09:29
self.relation_data.update(update_content)

for field in delete_fields:
del self.relation_data[field]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

...or we could just simply get rid of the whole update() method and use the "dict" directly.
Like databag ;-)

NOTE: With the current implementation I'm demonstrating above, we do raise an AttributeError on StateBase objects when no relation was passed, yet we wanna access relation data.

To me that makes sense, but we could think of alternatives if it seems bad for others.

Also, I think we could just turn relation into relation_id. That seems all possible (I checked references in the code) however if we wanna instantiate StateBase "children" objects with NO relation yet, then we've still gotta handle the "no relation ID/data" case.

@juditnovak
Copy link
Contributor Author

POC, not needed anymore

@juditnovak juditnovak closed this May 3, 2024
@deusebio deusebio deleted the poc_judit_dp_libs_experiment_events_split_dict branch May 3, 2024 21:14
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.

1 participant