fix
This commit is contained in:
parent
94de387e19
commit
3e2afe61b3
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -85,6 +85,7 @@ func (repo *PGrepo) GetLicenseWithId(id int) (models.License, error) {
|
|||||||
}
|
}
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
var license models.License
|
var license models.License
|
||||||
|
rows.Next()
|
||||||
err = rows.Scan(&license.ID, &license.Name)
|
err = rows.Scan(&license.ID, &license.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
@ -98,6 +99,7 @@ func (repo *PGrepo) GetCategoryWithId(id int) (models.Category, error) {
|
|||||||
}
|
}
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
var category models.Category
|
var category models.Category
|
||||||
|
rows.Next()
|
||||||
err = rows.Scan(&category.ID, &category.Name)
|
err = rows.Scan(&category.ID, &category.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user