Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip author field in Package entity #128

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

koki-develop
Copy link
Contributor

Closes #126

  • Modified the Package struct to skip the author field to resolve an issue where a User was being automatically created when creating a Package
  • Added an author_id field to ensure the author_id column is still created in the Package table (for backward compatibility)
  • After looking through the source code, I couldn't find where author_id is actively used, so this change should not affect existing behavior

To be honest, I'm not that familiar with vlang so I'm not sure if this approach is correct, but it solved the problem at least locally.

@medvednikov medvednikov merged commit 9a65199 into vlang:master Jan 6, 2025
1 of 2 checks passed
@medvednikov
Copy link
Member

Thanks a lot for this! I have no idea why it stopped working all of a sudden. Wasn't an issue before. Perhaps a change in ORM.

Need to add it to CI. (adding new modules to vpm)

@koki-develop koki-develop deleted the fix-user-duplication branch January 7, 2025 00:38
@koki-develop
Copy link
Contributor Author

@medvednikov
Thank you for merging!
Has this fix been reflected on vpm.vlang.io? The issue still seems to persist.

@medvednikov
Copy link
Member

Yes, it's been fixed. I've just deployed it, and it works great.

@medvednikov
Copy link
Member

(we don't have auto deployment for this repo yet)

@koki-develop
Copy link
Contributor Author

@medvednikov
Thank you! I was able to confirm that I can submit a new package! 🎉

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.

Error upon submitting new package
2 participants