mirror of
https://github.com/bellingcat/cisticola.git
synced 2026-06-08 03:18:34 +03:00
Add explicit source column to gsheet
This commit is contained in:
@@ -55,7 +55,7 @@ def sync_channels(args, session):
|
||||
channel = session.query(Channel).filter_by(platform=str(c["platform"]), screenname=str(c["screenname"])).first()
|
||||
|
||||
if not channel:
|
||||
channel = Channel(**c, source="researcher")
|
||||
channel = Channel(**c)
|
||||
logger.debug(f"{channel} does not exist, adding")
|
||||
session.add(channel)
|
||||
session.flush()
|
||||
@@ -77,7 +77,7 @@ def sync_channels(args, session):
|
||||
channel.public = c["public"]
|
||||
channel.chat = c["chat"]
|
||||
channel.notes = c["notes"]
|
||||
channel.source = "researcher"
|
||||
channel.source = c["source"]
|
||||
|
||||
session.flush()
|
||||
session.commit()
|
||||
@@ -118,7 +118,7 @@ def sync_channels(args, session):
|
||||
channel.public = c["public"]
|
||||
channel.chat = c["chat"]
|
||||
channel.notes = c["notes"]
|
||||
channel.source = "researcher"
|
||||
channel.source = c["source"]
|
||||
|
||||
if channel_info and channel.screenname != channel_info.screenname:
|
||||
channel.screenname = channel_info.screenname
|
||||
|
||||
Reference in New Issue
Block a user