- elif name in self.indexed_tables:
- return name
- elif name + 's' in self.indexed_tables:
- return name + 's'
- else:
- # Bogus. Be nice and return dummy
- return None
+
+ # Table name
+ for table in self.indexed_tables.values():
+ if name in (table.__tablename__, table.__singlename__):
+ return table.__tablename__
+
+ # Bogus. Be nice and return dummy
+ return None