Fix bug when object_auth was only built but not created
This commit is contained in:
parent
f497851fe3
commit
dd4c1697cd
|
@ -34,7 +34,7 @@ module OrbitCoreLib
|
|||
def get_object_auth_by_title(title)
|
||||
oa = self.object_auths.where({title: title }).first
|
||||
if oa.nil? && (self.class::ObjectAuthTitlesOptions.include? title)
|
||||
oa = self.object_auths.build title: title
|
||||
oa = self.object_auths.create title: title
|
||||
end
|
||||
oa
|
||||
end
|
||||
|
|
Reference in New Issue