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

Make room entity properties immutable #1218

Merged
merged 9 commits into from
Jan 10, 2025

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented Jan 2, 2025

Purpose

Make room entity properties immutable where appropriate. See #1210 (comment)

Short description

  • Make room entity properties immutable
  • Change code altering entity properties to creating a copied entity instead
  • Fix setting default color when not existing in local data stores (See change)

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@sunkup sunkup added the refactoring Internal improvement of existing functions label Jan 2, 2025
@sunkup sunkup self-assigned this Jan 2, 2025
@sunkup sunkup linked an issue Jan 2, 2025 that may be closed by this pull request
2 tasks
@sunkup sunkup requested a review from ArnyminerZ January 2, 2025 14:04
@sunkup sunkup force-pushed the 1210-make-data-classes-in-db-package-immutable branch from edc56ab to 82e872d Compare January 8, 2025 10:07
@sunkup sunkup force-pushed the 1210-make-data-classes-in-db-package-immutable branch from 2dc15eb to 1c35b17 Compare January 8, 2025 11:39
@sunkup sunkup force-pushed the 1210-make-data-classes-in-db-package-immutable branch from 1c35b17 to 51a201b Compare January 8, 2025 11:46
@sunkup sunkup changed the title Make entity properties immutable where possible Make entity properties immutable Jan 8, 2025
@sunkup sunkup changed the title Make entity properties immutable Make room entity properties immutable Jan 8, 2025
@sunkup sunkup marked this pull request as ready for review January 8, 2025 12:58
@sunkup
Copy link
Member Author

sunkup commented Jan 8, 2025

@ArnyminerZ Ready for review ~

@rfc2822
Copy link
Member

rfc2822 commented Jan 9, 2025

Needs merge with main branch

@sunkup
Copy link
Member Author

sunkup commented Jan 9, 2025

Done, ready @ArnyminerZ :)

ArnyminerZ
ArnyminerZ previously approved these changes Jan 9, 2025
@ArnyminerZ
Copy link
Member

Done, ready @ArnyminerZ :)

Sorry, I thought I had approved it already 😅

@sunkup sunkup requested a review from rfc2822 January 9, 2025 15:44
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

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

Nice 👍🏻 I think it's clearer than before because object changes are now explicit. I have

  • put a combined query/insert in the DavCollectionRepository into a transaction for correctness,
  • changed the "default color" code to something that I could better understand (hope it's still correct).

@rfc2822 rfc2822 merged commit 6a08497 into main-ose Jan 10, 2025
8 checks passed
@rfc2822 rfc2822 deleted the 1210-make-data-classes-in-db-package-immutable branch January 10, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Internal improvement of existing functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make data classes in db package immutable
3 participants