Correct cerc_persistence autodocumentation
This commit is contained in:
parent
1ddc26f04f
commit
0908e64782
@ -133,3 +133,7 @@ class City(Repository):
|
||||
except SQLAlchemyError as err:
|
||||
logging.error('Error while fetching city by name %s', err)
|
||||
raise SQLAlchemyError from err
|
||||
|
||||
def get_by_id(self, city_id) -> Model:
|
||||
with Session(self.engine) as session:
|
||||
return session.execute(select(Model).where(Model.id == city_id)).first()[0]
|
@ -5,18 +5,9 @@ Copyright © 2022 Concordia CERC group
|
||||
Project Coder Ruben Sanchez ruben.sanchez@mail.concordia.ca
|
||||
"""
|
||||
import datetime
|
||||
import distutils.spawn
|
||||
import os
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest import TestCase
|
||||
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy_utils import database_exists, create_database, drop_database
|
||||
|
||||
from cerc_persistence.db_control import DBControl
|
||||
from cerc_persistence.repository import Repository
|
||||
from cerc_persistence.models import City, Application, CityObject, SimulationResults, User
|
||||
from unittests.control import Control
|
||||
|
||||
control = Control()
|
||||
|
Loading…
Reference in New Issue
Block a user