diff options
author | Tomasz Zielinski <tomasz.zielinski@pyconsultant.eu> | 2012-01-08 16:17:48 +0100 |
---|---|---|
committer | Tomasz Zielinski <tomasz.zielinski@pyconsultant.eu> | 2012-01-08 16:17:48 +0100 |
commit | 5efcca3f1931f4a678c68404dcf1d592943ee2f8 (patch) | |
tree | 7658301a6f6560ad42cb839d231f681800a2055e | |
parent | 3f8c2870a7354fb63c209b90422e175bfb7f1c92 (diff) | |
download | askbot-5efcca3f1931f4a678c68404dcf1d592943ee2f8.tar.gz askbot-5efcca3f1931f4a678c68404dcf1d592943ee2f8.tar.bz2 askbot-5efcca3f1931f4a678c68404dcf1d592943ee2f8.zip |
Added comment in migration 0092, re migration activities
-rw-r--r-- | askbot/migrations/0092_postize_vote_and_activity.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/askbot/migrations/0092_postize_vote_and_activity.py b/askbot/migrations/0092_postize_vote_and_activity.py index 77d72c1f..a4cf3e4e 100644 --- a/askbot/migrations/0092_postize_vote_and_activity.py +++ b/askbot/migrations/0092_postize_vote_and_activity.py @@ -33,6 +33,10 @@ class Migration(DataMigration): for a in orm.Activity.objects.all(): # test if content_object for this activity exists - there might be a bunch of "abandoned" activities + # + # NOTE that if activity.content_object is gone then we cannot reliably recover it from activity.question + # - the latter is just a thread to which the activity is related! It might occasionally be the actual post + # the activity is related to, but it's not the general rule. model_signature = '.'.join([a.content_type.app_label, a.content_type.model]) if not orm[model_signature].objects.filter(id=a.object_id).exists(): abandoned_activities.append(a) |