MCPcopy Index your code
hub / github.com/diffgram/diffgram / set_logo

Method set_logo

shared/database/system_configs/system_configs.py:30–42  ·  view source on GitHub ↗

Saves the config blob path from logo and generates signed URL. :param session: :param blob_path: :return: Updated configs object

(session, image_id: int)

Source from the content-addressed store, hash-verified

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()

Callers 1

admin_set_logo_coreFunction · 0.80

Calls 3

get_configsMethod · 0.80
newMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected