made Licence optional

This commit is contained in:
Alex
2024-11-04 17:19:32 +01:00
parent eb7fc359e1
commit 0fa57bfe75
8 changed files with 69 additions and 38 deletions

View File

@@ -26,6 +26,6 @@ func (r *LicenceRepository) FindCategoriesByIDs(ids []uint) ([]models.Category,
func (r *LicenceRepository) FindCategoryByName(categoryName string) (models.Category, error) {
var category models.Category
err := database.DB.Where("category = ?", categoryName).First(&category).Error
err := database.DB.Where("name = ?", categoryName).First(&category).Error
return category, err
}