]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
use explicit else in declared attr
authorDoctor <thirvondukr@gmail.com>
Thu, 28 Apr 2022 05:01:58 +0000 (08:01 +0300)
committerDoctor <thirvondukr@gmail.com>
Thu, 28 Apr 2022 05:01:58 +0000 (08:01 +0300)
doc/build/orm/declarative_mixins.rst

index f5c292a42d063d7b8fe2e25e1605f6fc8f8ce18f..30dd0cba0cba7773e757b83fe16556cee5017926 100644 (file)
@@ -535,7 +535,8 @@ function should be invoked **for each class in the hierarchy**, in *almost*
         def id(cls):
             if has_inherited_table(cls):
                 return Column(ForeignKey("person.id"), primary_key=True)
-            return Column(Integer, primary_key=True)
+            else:
+                return Column(Integer, primary_key=True)
 
 
     class Person(HasIdMixin, Base):