@@ -377,7 +377,7 @@ class BaseOrgRepository extends BaseRepository {
377377 if ( isSecretariat ) {
378378 registryObject = await SecretariatObjectToSave . save ( options )
379379 } else {
380- await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , { options } )
380+ await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , options )
381381 }
382382 } else if ( registryObjectRaw . authority . includes ( 'CNA' ) ) {
383383 // A special case, we should make sure we have the default quota if it is not set
@@ -391,23 +391,23 @@ class BaseOrgRepository extends BaseRepository {
391391 if ( isSecretariat ) {
392392 registryObject = await CNAObjectToSave . save ( options )
393393 } else {
394- await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , { options } )
394+ await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , options )
395395 }
396396 } else if ( registryObjectRaw . authority . includes ( 'ADP' ) ) {
397397 registryObjectRaw . hard_quota = 0
398398 const adpObjectToSave = new ADPOrgModel ( registryObjectRaw )
399399 if ( isSecretariat ) {
400400 registryObject = await adpObjectToSave . save ( options )
401401 } else {
402- await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , { options } )
402+ await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , options )
403403 }
404404 } else if ( registryObjectRaw . authority . includes ( 'BULK_DOWNLOAD' ) ) {
405405 registryObjectRaw . hard_quota = 0
406406 const bulkDownloadObjectToSave = new BulkDownloadModel ( registryObjectRaw )
407407 if ( isSecretariat ) {
408408 registryObject = await bulkDownloadObjectToSave . save ( options )
409409 } else {
410- await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , { options } )
410+ await reviewObjectRepo . createReviewOrgObject ( registryObjectRaw , options )
411411 }
412412 } else {
413413 // Throw an Error instance so callers can catch and handle it properly
@@ -658,8 +658,8 @@ class BaseOrgRepository extends BaseRepository {
658658 }
659659
660660 // Save changes
661- await legacyOrg . save ( { options } )
662- await registryOrg . save ( { options } )
661+ await legacyOrg . save ( options )
662+ await registryOrg . save ( options )
663663 if ( isLegacyObject ) {
664664 const plainJavascriptLegacyOrg = legacyOrg . toObject ( )
665665 delete plainJavascriptLegacyOrg . __v
@@ -772,14 +772,14 @@ class BaseOrgRepository extends BaseRepository {
772772 // write the joint approval to the database
773773 jointApprovalRegistry = _ . merge ( { } , registryOrg . toObject ( ) , registryObjectRaw )
774774 if ( reviewObject ) {
775- await reviewObjectRepo . updateReviewOrgObject ( jointApprovalRegistry , reviewObject . uuid , { options } )
775+ await reviewObjectRepo . updateReviewOrgObject ( jointApprovalRegistry , reviewObject . uuid , options )
776776 } else {
777- await reviewObjectRepo . createReviewOrgObject ( jointApprovalRegistry , { options } )
777+ await reviewObjectRepo . createReviewOrgObject ( jointApprovalRegistry , options )
778778 }
779779 } else {
780780 // If no changes between org and new object but a review object exists, remove it since joint approval is no longer needed
781781 if ( reviewObject ) {
782- await reviewObjectRepo . rejectReviewOrgObject ( reviewObject . uuid , { options } )
782+ await reviewObjectRepo . rejectReviewOrgObject ( reviewObject . uuid , options )
783783 }
784784 }
785785 updatedRegistryOrg = _ . merge ( registryOrg , _ . omit ( registryObjectRaw , jointApprovalFieldsRegistry ) )
@@ -789,7 +789,7 @@ class BaseOrgRepository extends BaseRepository {
789789 // handle conversation
790790 const requestingUser = await userRepo . findUserByUUID ( requestingUserUUID , options )
791791 if ( conversation ) {
792- await conversationRepo . createConversation ( registryOrg . UUID , conversation , requestingUser , isSecretariat , { options } )
792+ await conversationRepo . createConversation ( registryOrg . UUID , conversation , requestingUser , isSecretariat , options )
793793 }
794794
795795 // ADD AUDIT ENTRY AUTOMATICALLY for the registry object before it gets saved.
0 commit comments