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 issue with service.save for adding courses so that there is no chance of misusing this or accidentally creating duplicate course instances. #397

Open
chrxr opened this issue Sep 13, 2021 · 0 comments
Assignees
Labels
3 A more involved task likely to be somewhat complex Server Code on the server side of the application Technical Debt Code requires cleanup

Comments

@chrxr
Copy link
Contributor

chrxr commented Sep 13, 2021

The CourseService.save method is specifically set up to handle creating new Courses, but the repository.save method will update a course if the data-to-be-saved includes an id. We should:

  1. Rename the CourseService.save method to something more descriptive, e.g. CourseService.createNewCourse.
  2. Instead of using repository.save, use repository.insert, so that it does not update existing.
@chrxr chrxr added the bug/broken functionality Something isn't working label Sep 13, 2021
@chrxr chrxr added the 3 A more involved task likely to be somewhat complex label Sep 13, 2021
@rmainwork rmainwork added Technical Debt Code requires cleanup and removed bug/broken functionality Something isn't working labels Sep 27, 2021
@rmainwork rmainwork added the Server Code on the server side of the application label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 A more involved task likely to be somewhat complex Server Code on the server side of the application Technical Debt Code requires cleanup
Projects
None yet
Development

No branches or pull requests

2 participants