Skip to content

Conversation

@Vlad0n20
Copy link
Contributor

@Vlad0n20 Vlad0n20 commented Mar 26, 2025

Purpose

Fix preprint updating

Changes

Add a manage command to fix why_no_data and has_data_links for broken preprints due to an unknown bug on FE (Futa described it in the comments to the ticket)

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

https://openscience.atlassian.net/browse/ENG-7503?atlOrigin=eyJpIjoiZWYyNDhjYjBiMWY5NDhjNGEyODdiOTgwMmE1YzlhNTciLCJwIjoiaiJ9

)

if updated_has_data_links != 'no' and updated_why_no_data:
if updated_has_data_links != 'no':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I managed to reproduce this problem locally by manually changing the database record, but the problem still exists, I believe this is the right solution.

Suggested change
if updated_has_data_links != 'no':
if updated_has_data_links != 'no' and updated_why_no_data and validated_data.get('data_links'):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these changes

@Vlad0n20 Vlad0n20 changed the title Remove check if updated_why_no_data comes from backend [ENG-7503] - Fix user unable to edit OR create new version of a preprint Mar 28, 2025
Copy link
Contributor

@Johnetordoff Johnetordoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just write a few different test cases to the osf_tests/management_commands/ directory. To make clear what use case of this is.

@brianjgeiger brianjgeiger deleted the branch CenterForOpenScience:feature/pbs-25-05 April 7, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants