mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
minor fixes
This commit is contained in:
@@ -59,7 +59,7 @@ func mustCheckModelManager(modelMan IModelManager) {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
if !utils.IsInStringArray(v, allowedValues) {
|
||||
if len(v) > 0 && !utils.IsInStringArray(v, allowedValues) {
|
||||
msg := fmt.Sprintf("model manager %s: column %s has invalid tag %s:\"%s\", expecting %v",
|
||||
modelMan.KeywordPlural(), col.Name(), tagName, v, allowedValues)
|
||||
panic(msg)
|
||||
|
||||
@@ -137,7 +137,7 @@ func domainManagerFieldFilter(domainId, field string) *sqlchemy.SSubQuery {
|
||||
accounts = accounts.Equals("status", api.CLOUD_PROVIDER_CONNECTED)
|
||||
accounts = accounts.IsTrue("enabled")
|
||||
|
||||
q := CloudproviderManager.Query(field).Equals("cloudaccount_id", accounts.SubQuery())
|
||||
q := CloudproviderManager.Query(field).In("cloudaccount_id", accounts.SubQuery())
|
||||
/*q := providers.Query(providers.Field(field))
|
||||
q = q.Join(accounts, sqlchemy.Equals(accounts.Field("id"), providers.Field("cloudaccount_id")))
|
||||
q = q.Filter(sqlchemy.OR(
|
||||
|
||||
@@ -1299,7 +1299,7 @@ func (manager *SGuestManager) validateCreateData(
|
||||
}
|
||||
|
||||
input.Project = ownerId.GetProjectId()
|
||||
input.Domain = ownerId.GetProjectDomainId()
|
||||
input.ProjectDomain = ownerId.GetProjectDomainId()
|
||||
return input, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ func init() {
|
||||
*/
|
||||
|
||||
type SRole struct {
|
||||
SIdentityBaseResource `"name->update":"none"`
|
||||
SIdentityBaseResource `"name->update":""`
|
||||
db.SSharableBaseResource
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user