twitter #2
@ -94,10 +94,6 @@ def add_twitter_campaign():
|
|||||||
user_input = request_json['user_input'],
|
user_input = request_json['user_input'],
|
||||||
)
|
)
|
||||||
|
|
||||||
db.session.add(twitter_campaign)
|
|
||||||
db.session.flush()
|
|
||||||
db.session.refresh()
|
|
||||||
|
|
||||||
twitter_campaign_post = TwitterPost(
|
twitter_campaign_post = TwitterPost(
|
||||||
id = str(uuid4()),
|
id = str(uuid4()),
|
||||||
campaign_id = twitter_campaign.id,
|
campaign_id = twitter_campaign.id,
|
||||||
@ -106,6 +102,7 @@ def add_twitter_campaign():
|
|||||||
twitter_post_id = response['id']
|
twitter_post_id = response['id']
|
||||||
)
|
)
|
||||||
|
|
||||||
|
db.session.add(twitter_campaign)
|
||||||
db.session.add(twitter_campaign_post)
|
db.session.add(twitter_campaign_post)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user