summaryrefslogtreecommitdiffstats
path: root/dia2pg.rb
diff options
context:
space:
mode:
Diffstat (limited to 'dia2pg.rb')
-rwxr-xr-xdia2pg.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/dia2pg.rb b/dia2pg.rb
index 854d65c..e52ad0c 100755
--- a/dia2pg.rb
+++ b/dia2pg.rb
@@ -190,9 +190,7 @@ class Attribute
end
#
def real_name
- if no_rename?
- @name
- elsif foreign?
+ if not no_rename? and foreign?
rl = RELATIONS.find { |r| r.tbl_to==@tbl and r.attr_to.name==@name }
if rl.nil?
$stderr << "MISSING RELATION FOR FOREIGN KEY table:#{@tbl.name} attribute:#{@name}\n"