projects
/
oweals
/
karmaworld.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2374f49
)
Fix a bug with tweets
author
Charles Connell
<charles@connells.org>
Sat, 10 May 2014 23:11:51 +0000
(19:11 -0400)
committer
Charles Connell
<charles@connells.org>
Sat, 10 May 2014 23:11:51 +0000
(19:11 -0400)
karmaworld/apps/notes/tasks.py
patch
|
blob
|
history
diff --git
a/karmaworld/apps/notes/tasks.py
b/karmaworld/apps/notes/tasks.py
index fe5534b1bdbb5f621a7fe53f4d76510171907ce2..946ebaa0aedd48540b2e3438cd15c41393be9ce2 100644
(file)
--- a/
karmaworld/apps/notes/tasks.py
+++ b/
karmaworld/apps/notes/tasks.py
@@
-58,8
+58,13
@@
def tweet_string(note):
# 57 characters
short_note = note.name[:57]
- if note.course.school.hashtag:
- return short_url + " #" + note.course.school.hashtag + " " + \
+ if note.course.school:
+ school = note.course.school
+ else:
+ school = note.course.department.school
+
+ if school.hashtag:
+ return short_url + " #" + school.hashtag + " " + \
short_course + ": " + \
short_note
else: