Saves the config blob path from logo and generates signed URL. :param session: :param blob_path: :return: Updated configs object
(session, image_id: int)
| 28 | |
| 29 | @staticmethod |
| 30 | def set_logo(session, image_id: int): |
| 31 | """ |
| 32 | Saves the config blob path from logo and generates signed URL. |
| 33 | :param session: |
| 34 | :param blob_path: |
| 35 | :return: Updated configs object |
| 36 | """ |
| 37 | configs = SystemConfigs.get_configs(session = session) |
| 38 | if not configs: |
| 39 | configs = SystemConfigs.new(session = session) |
| 40 | configs.logo_id = image_id |
| 41 | session.add(configs) |
| 42 | return configs |
| 43 | @staticmethod |
| 44 | def get_configs(session): |
| 45 | result = session.query(SystemConfigs).first() |
no test coverage detected