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

feat: added new category field in obligations #93

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

bhowmik94
Copy link

Changes

Submitter Checklist

  • Includes tests (if there is a feature changed/added)
  • Includes docs ( if changes are user facing)
  • I have tested my changes locally.

References

@@ -453,6 +477,11 @@ func (o *Obligation) BeforeUpdate(tx *gorm.DB) (err error) {
return fmt.Errorf("obligation classification must be one of the following values:%s", allClassifications)
}
}

if err := validateCategory(o); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I do not pass category while updating an obligation(I want to update other fields), internal server error is raised.
This shouldn't be the case.
image
image

@bhowmik94 bhowmik94 force-pushed the feat/api/categoryField-obligation branch from d2d163d to 38710ad Compare January 16, 2025 11:50
@deo002 deo002 force-pushed the feat/api/categoryField-obligation branch from 38710ad to 58fc24c Compare February 19, 2025 08:27
@deo002 deo002 requested a review from GMishx February 19, 2025 08:29
Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Changes looks good.

Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Tested, working as expected

@GMishx
Copy link
Member

GMishx commented Feb 27, 2025

@deo002 please fix the CI lint error

@deo002 deo002 force-pushed the feat/api/categoryField-obligation branch from 58fc24c to 8b25459 Compare February 27, 2025 06:36
@GMishx GMishx merged commit 73ac042 into fossology:main Feb 27, 2025
7 checks passed
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.

New field "Category" in obligations GET, PUT, POST
3 participants