Commits

Dan Carroll committed 32481e0

Make sure activity sync migration takes into account all previous providers. Fixes #25

Comments (0)

Files changed (1)

mysite/activitysync/migrations/0003_convert_to_provider_objects.py

             return u"twitter"
         elif activity.source == 'DL':
             return u"delicious"
+        elif activity.source == 'DG':
+            return u"digg"
         elif activity.source == 'FB':
             return u"facebook"
         elif activity.source == 'HU':
             return u"Twitter"
         elif activity.source == 'DL':
             return u"Delicious"
+        elif activity.source == 'DG':
+            return u"Digg"
         elif activity.source == 'FB':
             return u"Facebook"
         elif activity.source == 'HU':
     def get_activity_prefix(self, activity):
         if activity.source == 'DL':
             return u'Bookmarked '
+        elif activity.source == 'DG':
+            return u'Dugg '
         elif activity.source == 'HU':
             return u'Watched '
         elif activity.source == 'RD':
     
     def get_network_link(self, activity):
         if activity.source == 'T':
-            return u"http://twitter.com/erunama"
+            return u"http://twitter.com/"
         elif activity.source == 'DL':
-            return u"http://delicious.com/erunama"
+            return u"http://delicious.com/"
+        elif activity.source == 'DG':
+            return u"http://www.digg.com"
         elif activity.source == 'FB':
-            return u"http://www.facebook.com/people/Dan-Carroll/401024"
+            return u"http://www.facebook.com/"
         elif activity.source == 'HU':
-            return u"http://www.hulu.com/profiles/erunama/"
+            return u"http://www.hulu.com/"
         elif activity.source == 'RD':
-            return u"http://www.reddit.com/user/erunama/"
+            return u"http://www.reddit.com/"
         elif activity.source == 'GR':
-            return u"http://www.google.com/reader/shared/dancarroll"
+            return u"http://www.google.com/reader/"
 
 # HELPER METHODS FOR BACKWARDS MIGRATION
     def sourceid_to_sourcechoice(self, provider):
             return u"T"
         elif provider.sourceid == 'delicious':
             return u"DL"
+        elif provider.sourceid == 'digg':
+            return u"DG"
         elif provider.sourceid == 'facebook':
             return u"FB"
         elif provider.sourceid == 'hulu':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.