Private
Public Access
1
0

rowperfect3

This commit is contained in:
Sander Roosendaal
2016-12-25 20:53:59 +01:00
parent d60f24c040
commit c3dbd71465
2 changed files with 12 additions and 2 deletions

View File

@@ -532,5 +532,11 @@ class SiteAnnouncement(models.Model):
self.expires = timezone.now()+datetime.timedelta(days=10)
self.modified = timezone.now()
if self.dotweet:
status = tweetapi.PostUpdate(self.announcement)
try:
status = tweetapi.PostUpdate(self.announcement)
except:
try:
status = tweetapi.PostUpdate(self.announcement[:135])
except:
pass
return super(SiteAnnouncement,self).save(*args, **kwargs)