-
Notifications
You must be signed in to change notification settings - Fork 24
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
psp-7346 correct bracket usage, ensure logic limited to file close only. #3622
Conversation
✅ No secrets were detected in the code. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #3622 +/- ##
==========================================
- Coverage 69.51% 63.43% -6.09%
==========================================
Files 1375 474 -901
Lines 34403 15416 -18987
Branches 6496 1059 -5437
==========================================
- Hits 23916 9779 -14137
+ Misses 10227 5376 -4851
- Partials 260 261 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -242,7 +242,7 @@ public PimsAcquisitionFile Update(PimsAcquisitionFile acquisitionFile, IEnumerab | |||
|
|||
_user.ThrowInvalidAccessToAcquisitionFile(_userRepository, _acqFileRepository, acquisitionFile.Internal_Id); | |||
ValidateVersion(acquisitionFile.Internal_Id, acquisitionFile.ConcurrencyControlNumber); | |||
ValidateDrafts(acquisitionFile.Internal_Id); | |||
ValidateDrafts(acquisitionFile); |
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.
kinda of a nit: The current acq file is being retrieved multiple times for each validation function, ideally we would retrieve it once and pass it to the validation logic
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.
Hmm, I only see one request for the acquisition file in any validate functions within Update:
ValidatePayeeDependency
the only other call is at the end of the update function, but that is after the transaction is committed so I think that makes sense.
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.
for example teh GetCurrentAcquisitionStatus will retrieve the latest acq file for the given id
@@ -948,7 +949,7 @@ private void ValidateInterestHoldersDependency(long acquisitionFileId, List<Pims | |||
var currentAcquisitionFile = _acqFileRepository.GetById(acquisitionFileId); | |||
AcquisitionStatusTypes currentAcquisitionStatus; | |||
|
|||
if (Enum.TryParse(currentAcquisitionFile.AcquisitionFileStatusTypeCode, out currentAcquisitionStatus)) | |||
if (Enum.TryParse(currentAcquisitionFile?.AcquisitionFileStatusTypeCode, out currentAcquisitionStatus)) |
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.
the acq file should never be null here.
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.
imo, having the code throw here if null is a good idea
44dc8f7
to
247f20e
Compare
✅ No secrets were detected in the code. |
2 similar comments
✅ No secrets were detected in the code. |
✅ No secrets were detected in the code. |
f3336d5
to
49b1d24
Compare
✅ No secrets were detected in the code. |
* Added check status logic when updating acq and related entities | psp-7006 (#3602) * Added status checking to details, take, compensation and other acq file pages * Updated backend and updated tests * Fixed lint * Refactored solver to be simpler * Added tests * Pr comments * Added the sys-admin to edit acquisition fields * CI: Bump version to v4.0.0-67.24 * Updated placeholder display (#3620) * CI: Bump version to v4.0.0-67.25 * dialog correction. (#3629) Co-authored-by: Smith <[email protected]> * CI: Bump version to v4.0.0-67.26 * Keycloak Refactor (#3624) * Refactored keycloak sync to use the keycloak repository used by the API. ALso removed tools.Core and removed redundant models * pr fixes * CI: Bump version to v4.0.0-67.27 * System error modal | psp-7304 (#3628) * Updated Generic modal to use a variant * Improved System error modal * Lit fixes * Info fixes * CI: Bump version to v4.0.0-67.28 * psp-7346 correct bracket usage, ensure logic limited to file close only. (#3622) * psp-7346 correct bracket usage, ensure logic limited to file close only. * comment from code review. * test correction. --------- Co-authored-by: Smith <[email protected]> * CI: Bump version to v4.0.0-67.29 * requested source marked as nullable for validation. (#3630) Co-authored-by: Smith <[email protected]> * CI: Bump version to v4.0.0-67.30 * allow showing the edit screen for management activity while the popout is open. (#3632) Co-authored-by: Smith <[email protected]> * CI: Bump version to v4.0.0-67.31 * Pims api to Frontend ts generator and generated files (#3618) * Refactored concept models. Created a new library and cleaned dependencies between projects. Cleaned names of reused concepts and standarized concept namespace. Cleaned extension and help files * Fixed lints * Initial generator work * Cleaned up files and improved translation * Updated namespaces and path for the api models * Updated generator and cleaned up code * Added make command to generate ts api files and lint them. * First generation of the pims api. * Cleaned up generator and handled generic types. Improved header docks. * Fixed solution * Updated models for keycloak sync and fixed lint warnings * Fixed registering mappers * CI: Bump version to v4.0.0-67.32 * Bump DEV version - IS68 (#3636) * CI: Bump version to v4.0.0-68.1 * Manual merges and re-generated snaps * moved disposition models to the new api-models project * re-generated api models * Changed disposition property to property model type --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: devinleighsmith <[email protected]> Co-authored-by: Smith <[email protected]> Co-authored-by: Alejandro Sanchez <[email protected]>
No description provided.