mirror of
https://github.com/bellingcat/cisticola.git
synced 2026-06-13 05:48:33 +03:00
Update channel source, only if non-researcher
This commit is contained in:
@@ -150,6 +150,15 @@ class ETLController:
|
|||||||
|
|
||||||
if instance:
|
if instance:
|
||||||
logger.info(f"Found matching DB entry for {obj}: {instance}")
|
logger.info(f"Found matching DB entry for {obj}: {instance}")
|
||||||
|
|
||||||
|
if type(obj) == Channel:
|
||||||
|
if obj.source != instance.source and obj.source == 'linked_channel' and instance.source != 'researcher':
|
||||||
|
logger.info(f"Updating source to linked channel")
|
||||||
|
instance.source = obj.source
|
||||||
|
instance.notes = obj.notes
|
||||||
|
session.flush()
|
||||||
|
session.commit()
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
# Don't hydrate videos, because they can be quite large and this is time consuming
|
# Don't hydrate videos, because they can be quite large and this is time consuming
|
||||||
|
|||||||
Reference in New Issue
Block a user