Skip to content

Commit 3145cf2

Browse files
authored
[ENG-10042] Fix/eng 10042 (#11593)
Revert BE changes meant to fix 10042 and replace with FE changes.
1 parent f106062 commit 3145cf2

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

api/actions/serializers.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
)
2727

2828
from 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:

0 commit comments

Comments
 (0)