Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handling missing feed in social message.

  • Loading branch information...
commit 71574a2c51a1acd6201c2a803443597f934d0a84 1 parent dc9cb08
@samuelclay authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 apps/social/models.py
View
9 apps/social/models.py
@@ -1924,10 +1924,11 @@ def generate_post_to_service_message(self, truncate=None, include_url=True):
if include_url and truncate:
message = truncate_chars(message, truncate - 18 - 30)
feed = Feed.get_by_id(self.story_feed_id)
- if truncate:
- message += " (%s)" % truncate_chars(feed.feed_title, 18)
- else:
- message += " (%s)" % truncate_chars(feed.feed_title, 30)
+ if feed:
+ if truncate:
+ message += " (%s)" % truncate_chars(feed.feed_title, 18)
+ else:
+ message += " (%s)" % truncate_chars(feed.feed_title, 30)
if include_url:
message += " " + self.blurblog_permalink()
elif include_url:
Please sign in to comment.
Something went wrong with that request. Please try again.