try
This commit is contained in:
@@ -99,7 +99,7 @@ except Exception as e:
|
||||
|
||||
def generate_intro_tweet(author):
|
||||
"""Generate an intro tweet for the weekly thread."""
|
||||
credentials = next((cred for cred in X_API_CREDENTIALS if cred["username"] == author["username"]), None)
|
||||
credentials = X_API_CREDENTIALS.get(author["username"])
|
||||
if not credentials:
|
||||
logging.error(f"No X credentials found for {author['username']}")
|
||||
return None
|
||||
@@ -145,7 +145,7 @@ def generate_intro_tweet(author):
|
||||
|
||||
def generate_final_cta(author):
|
||||
"""Generate a final CTA tweet for the weekly thread using GPT."""
|
||||
credentials = next((cred for cred in X_API_CREDENTIALS if cred["username"] == author["username"]), None)
|
||||
credentials = X_API_CREDENTIALS.get(author["username"])
|
||||
if not credentials:
|
||||
logging.error(f"No X credentials found for {author['username']}")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user