fix crash for unknown pg member names
This commit is contained in:
parent
a66c607608
commit
2e2daf173f
@ -213,11 +213,12 @@ class Application
|
|||||||
pg_by_m2m = pg_roles.inject([]){|a,r|
|
pg_by_m2m = pg_roles.inject([]){|a,r|
|
||||||
next a unless r.member_names
|
next a unless r.member_names
|
||||||
a + r.member_names.map{|name|
|
a + r.member_names.map{|name|
|
||||||
has_member = pg_by_name[name]
|
if has_member=pg_by_name[name]
|
||||||
unless has_member
|
[r.name, has_member.name]
|
||||||
|
else
|
||||||
log.warn{"pg member with name #{name} is unknown"}
|
log.warn{"pg member with name #{name} is unknown"}
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
[r.name, has_member.name]
|
|
||||||
}.compact
|
}.compact
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user