MCPcopy Create free account
hub / github.com/diffgram/diffgram / remove_applied

Method remove_applied

shared/database/tag/tag.py:166–190  ·  view source on GitHub ↗
(
        self,
        object_id: int,
        object_type: str,
        session,
        project,
        log)

Source from the content-addressed store, hash-verified

164 return tag
165
166 def remove_applied(
167 self,
168 object_id: int,
169 object_type: str,
170 session,
171 project,
172 log):
173
174 junction_class = Tag.get_junction_class(object_type)
175
176 junction_tag = junction_class.get(
177 object_id,
178 project.id,
179 self,
180 session
181 )
182 if junction_tag:
183 session.delete(junction_tag)
184 log['info']['tag'] = "success"
185 log['success'] = True
186
187 else:
188 log['info']['tag'] = "Nothing to delete"
189
190 return log
191
192 def get_junction_class(object_type):
193 junction_class = None

Callers 1

Calls 3

get_junction_classMethod · 0.80
getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected