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.
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
Feature/SCKAN-364 - Add statement preview row to the export + persist statement preview suffix and prefix #404
Feature/SCKAN-364 - Add statement preview row to the export + persist statement preview suffix and prefix #404
Changes from 6 commits
0abd47e
dce73c1
5f20fd0
8c0d561
a98e76c
7f0574f
2b3c1f1
b2d2bfe
c15e960
f5f6bc9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Isn't cs the connectivity statement instance already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here yes all the fields we want can be accessed using the cs instance, and hence I updated the code to get it directly from
cs
instance. thanks for pointing this out!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed here yes @afonsobspinto, because we need the
origin.name
andget_laterality_description()
, both not accessible with thecs
instance. However we can get them using connectivity_statement object.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a similar case as - #381 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have the time, my preference would be to add the necessary methods inline on the migration (or in a migrations helper file). The reasoning being that I don't think that makes sense to to harm the performance of the server that's running all the time, for ease of use in one time, the migration; Besides I would say conceptually it makes more sense to do so, so that the migration is independent of the model evolution over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the suggestion @afonsobspinto :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a good case where we can invert the condition. Instead of having all the logic wrapped in a if we can do: