Skip to content

Commit

Permalink
revert: only connect to pages that are not already connected
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Aug 19, 2024
1 parent ed51835 commit 07374bd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions routers/facebook_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,6 @@ def fb_connect_redirect(request: Request):
status_code=400,
)

# only connect to pages that are not already connected
fb_pages = [
fb_page
for fb_page in fb_pages
if BotIntegration.objects.filter(
fb_page_id=fb_page["id"]
) # this will need to change if we ever add instagram
.exclude(saved_run__isnull=True)
.count()
== 0
]

map_parallel(_subscribe_to_page, fb_pages)
integrations = BotIntegration.objects.reset_fb_pages_for_user(
request.user.uid, fb_pages
Expand Down

0 comments on commit 07374bd

Please sign in to comment.