Skip to content

Commit 185819f

Browse files
author
Sean Auriti
committed
change filename
1 parent 38faed0 commit 185819f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def post_to_twitter(sender, instance, *args, **kwargs):
134134
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
135135
auth.set_access_token(access_key, access_secret)
136136
api = tweepy.API(auth)
137-
file = default_storage.open(instance.screenshot, 'rb')
137+
file = default_storage.open(instance.screenshot.file.name, 'rb')
138138
media_ids = api.media_upload(filename=instance.screenshot.file.name, file=file)
139139
params = dict(status=mesg, media_ids=[media_ids.media_id_string])
140140
api.update_status(**params)

0 commit comments

Comments
 (0)