File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 2626)
2727
2828from osf .utils .workflows import (
29- ApprovalStates ,
3029 DefaultStates ,
3130 DefaultTriggers ,
3231 ReviewStates ,
@@ -279,31 +278,6 @@ def create(self, validated_data):
279278 comment = validated_data .pop ('comment' , '' )
280279 user = validated_data .pop ('user' )
281280
282- pending_schema_response_updates = target .schema_responses .filter (
283- reviews_state__in = [
284- ApprovalStates .UNAPPROVED .db_name ,
285- ApprovalStates .PENDING_MODERATION .db_name ,
286- ],
287- previous_response__isnull = False , # Only updates, not initial submissions
288- ).order_by ('-created' )
289-
290- if pending_schema_response_updates .exists ():
291- pending_response = pending_schema_response_updates .first ()
292- short_message = 'This registration has a pending update'
293- long_message = (
294- f'This registration has a pending schema response update (ID: { pending_response ._id } ) '
295- f'that must be moderated. Please use the schema response actions endpoint to approve or reject '
296- f'the update instead of creating a registration action.'
297- )
298- raise HTTPError (
299- http_status .HTTP_400_BAD_REQUEST ,
300- data = {
301- 'message_short' : short_message ,
302- 'message_long' : long_message ,
303- 'schema_response_id' : pending_response ._id ,
304- },
305- )
306-
307281 sanction = target .sanction
308282
309283 try :
You can’t perform that action at this time.
0 commit comments