This commit is contained in:
konrad 2018-01-16 14:28:44 +01:00 committed by kolaente
parent 9c7d2ca000
commit df0482dac2
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ func TestAddOrUpdatePublisher(t *testing.T) {
// Bootstrap our test publisher
testpublisher := Publisher{
Name: "Testpublisher",
Name: "Testpublisher",
}
// Delete every prexisting publisher to have a fresh start

View File

@ -9,11 +9,11 @@ func AddOrUpdatePublisher(publisher Publisher) (newPublisher Publisher, err erro
return Publisher{}, fmt.Errorf("You need at least a name to insert a new publisher")
}
_, err = x.Insert(&publisher)
_, err = x.Insert(&publisher)
if err != nil {
return Publisher{}, err
}
if err != nil {
return Publisher{}, err
}
} else {
_, err = x.ID(publisher.ID).Update(&publisher)