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: only insert types history if it's not empty #128

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

lchen-2101
Copy link
Collaborator

closes #127

Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/regtech_user_fi_management/entities
  listeners.py
Project Total  

This report was generated by python-coverage-comment-action

Comment on lines 80 to 81
no_types = deepcopy(self.target)
delattr(no_types, "sbl_institution_types")
Copy link
Member

Choose a reason for hiding this comment

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

Is everything identical to the above test with the exception of these two lines? It seems like it, but my eyeball 👁️ diff is only so good.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeap, only removed the types from the dao

Copy link
Member

Choose a reason for hiding this comment

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

...and is deleting the sbl_institutions_types attribute from the object really simulating what will happen in the case? Is it not enough to just make it None or an empty list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeap, empty list works, actually that probably simulates the actual flow better, I'll update that; setting None makes it incompatible type.

@lchen-2101 lchen-2101 merged commit 1da51f5 into main Mar 19, 2024
4 checks passed
@lchen-2101 lchen-2101 deleted the fix/127_check_types_before_insert_history branch March 19, 2024 18:52
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.

Bug: fix mapping listener when types field is empty
2 participants