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