From 88ec56f1541535cdd2fe69b0ceff0bcd39be33b3 Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 1 Mar 2022 17:53:44 +0100 Subject: [PATCH] [mastodon] Changed MastodonAccount column: instance_id -> instance --- kibicara/platforms/mastodon/bot.py | 4 ++-- kibicara/platforms/mastodon/model.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kibicara/platforms/mastodon/bot.py b/kibicara/platforms/mastodon/bot.py index e4845ee..1ecc89d 100644 --- a/kibicara/platforms/mastodon/bot.py +++ b/kibicara/platforms/mastodon/bot.py @@ -22,8 +22,8 @@ class MastodonBot(Censor): self.model = mastodon_account_model self.enabled = self.model.enabled self.account = Mastodon( - client_id=self.model.instance_id.client_id, - client_secret=self.model.instance_id.client_secret, + client_id=self.model.instance.client_id, + client_secret=self.model.instance.client_secret, access_token=self.model.access_token, ) diff --git a/kibicara/platforms/mastodon/model.py b/kibicara/platforms/mastodon/model.py index 722dd39..c7a3140 100644 --- a/kibicara/platforms/mastodon/model.py +++ b/kibicara/platforms/mastodon/model.py @@ -21,7 +21,7 @@ class MastodonInstance(Model): class MastodonAccount(Model): id: Integer(primary_key=True) = None hood: ForeignKey(Hood) - instance_id: ForeignKey(MastodonInstance) + instance: ForeignKey(MastodonInstance) access_token: Text() enabled: Boolean() = False last_seen: Text()