@@ -1422,3 +1422,65 @@ def test_non_accepted_submission_cannot_edit_restricted_fields_after_cfp_deadlin
14221422 assert submission .title .localize ("en" ) == original_title
14231423 assert submission .abstract .localize ("en" ) == original_abstract
14241424 assert submission .elevator_pitch .localize ("en" ) == original_elevator_pitch
1425+
1426+
1427+ def test_non_accepted_submission_can_edit_non_restricted_fields_after_cfp_deadline (
1428+ graphql_client , user
1429+ ):
1430+ """Non-accepted submissions can edit non-restricted fields when CFP is closed."""
1431+ conference = ConferenceFactory (
1432+ topics = ("life" , "diy" ),
1433+ languages = ("en" ,),
1434+ durations = ("10" , "20" ),
1435+ active_cfp = False , # CFP deadline is in the past
1436+ audience_levels = ("adult" , "senior" ),
1437+ submission_types = ("talk" , "workshop" ),
1438+ )
1439+
1440+ submission = SubmissionFactory (
1441+ speaker_id = user .id ,
1442+ status = Submission .STATUS .proposed ,
1443+ custom_topic = "life" ,
1444+ custom_duration = "10m" ,
1445+ custom_audience_level = "adult" ,
1446+ custom_submission_type = "talk" ,
1447+ languages = ["en" ],
1448+ tags = ["python" , "ml" ],
1449+ conference = conference ,
1450+ )
1451+
1452+ original_title = submission .title .localize ("en" )
1453+ original_abstract = submission .abstract .localize ("en" )
1454+ original_elevator_pitch = submission .elevator_pitch .localize ("en" )
1455+
1456+ graphql_client .force_login (user )
1457+
1458+ # Update non-restricted fields (tags, short_social_summary, do_not_record)
1459+ # while keeping restricted fields unchanged
1460+ response = _update_submission (
1461+ graphql_client ,
1462+ submission = submission ,
1463+ new_title = {"en" : original_title }, # Keep original title
1464+ new_abstract = {"en" : original_abstract }, # Keep original abstract
1465+ new_elevator_pitch = {"en" : original_elevator_pitch }, # Keep original elevator pitch
1466+ new_tag = submission .tags .last (), # Change tag
1467+ new_short_social_summary = "Updated social summary" , # Change social summary
1468+ new_do_not_record = True , # Change do_not_record flag
1469+ )
1470+
1471+ # Should succeed since we're only updating non-restricted fields
1472+ assert response ["data" ]["updateSubmission" ]["__typename" ] == "Submission"
1473+ assert response ["data" ]["updateSubmission" ]["shortSocialSummary" ] == "Updated social summary"
1474+ assert response ["data" ]["updateSubmission" ]["doNotRecord" ] is True
1475+
1476+ # Verify restricted fields remain unchanged
1477+ assert response ["data" ]["updateSubmission" ]["title" ] == original_title
1478+ assert response ["data" ]["updateSubmission" ]["abstract" ] == original_abstract
1479+ assert response ["data" ]["updateSubmission" ]["elevatorPitch" ] == original_elevator_pitch
1480+
1481+ submission .refresh_from_db ()
1482+ assert submission .short_social_summary == "Updated social summary"
1483+ assert submission .do_not_record is True
1484+ assert submission .title .localize ("en" ) == original_title
1485+ assert submission .abstract .localize ("en" ) == original_abstract
1486+ assert submission .elevator_pitch .localize ("en" ) == original_elevator_pitch
0 commit comments