mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
Undo changes to getObject calls in sql
This commit is contained in:
parent
7e0d5648d1
commit
d09f416423
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package sql
|
package sql
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -6,13 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (d *SqlDb) GetAccessKey(projectID int, accessKeyID int) (key db.AccessKey, err error) {
|
func (d *SqlDb) GetAccessKey(projectID int, accessKeyID int) (key db.AccessKey, err error) {
|
||||||
var keyObj interface{}
|
err = d.getObject(projectID, db.AccessKeyProps, accessKeyID, &key)
|
||||||
keyObj, err = d.GetObject(db.AccessKeyProps, accessKeyID)
|
|
||||||
key = keyObj.(db.AccessKey)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,7 @@ package sql
|
|||||||
import "github.com/ansible-semaphore/semaphore/db"
|
import "github.com/ansible-semaphore/semaphore/db"
|
||||||
|
|
||||||
func (d *SqlDb) GetInventory(projectID int, inventoryID int) (inventory db.Inventory, err error) {
|
func (d *SqlDb) GetInventory(projectID int, inventoryID int) (inventory db.Inventory, err error) {
|
||||||
var invObj interface{}
|
err = d.getObject(projectID, db.InventoryProps, inventoryID, &inventory)
|
||||||
invObj, err = d.GetObject(db.InventoryProps, inventoryID)
|
|
||||||
inventory = invObj.(db.Inventory)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user