Skip to content

Commit

Permalink
Format previously untracked file "persistable_model_meta.py"
Browse files Browse the repository at this point in the history
Signed-off-by: Jean Snyman <git@jsnyman.com>
  • Loading branch information
stringlytyped committed Jun 10, 2024
1 parent ce9315a commit 9c79359
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keylime/models/base/persistable_model_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from sqlalchemy import Column, ForeignKey, Integer, Table, Text
from sqlalchemy.dialects.mysql import LONGTEXT
from sqlalchemy.orm import relationship, RelationshipProperty
from sqlalchemy.orm import RelationshipProperty, relationship

from keylime.models.base.associations import (
BelongsToAssociation,
Expand Down Expand Up @@ -222,7 +222,7 @@ def process_schema(cls) -> None:
# Build SQLAlchemy Relationships from the associations defined by the model's schema
relationships = {name: type(cls).__assoc_to_rship(assoc) for name, assoc in cls.entity_associations.items()}
# Use SQLAlchemy to map the empty mapping class to the DB by providing the SQLAlchemy Table and Relationships
db_manager.registry.map_imperatively(cls.db_mapping, cls.db_table, properties=relationships) # type: ignore[reportArgumentType]
db_manager.registry.map_imperatively(cls.db_mapping, cls.db_table, properties=relationships) # type: ignore[reportArgumentType]

# Also perform the DB mapping for each associated model to ensure this is done prior to attempting any queries
for _, association in cls.associations.items():
Expand Down

0 comments on commit 9c79359

Please sign in to comment.