Fix bug when object_auth was only built but not created
This commit is contained in:
1 parent
f497851fe3
commit
dd4c1697cd
1 file changed
+1
-1
@@ -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
Block a user