Issue Details (XML | Word | Printable)

Key: FLM-92
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Adam Zieliński
Reporter: Borys Musielak
Votes: 0
Watchers: 0
Operations

Clone this issue
Create sub-task
If you were logged in you would be able to see more operations.
Filmaster

Check for all user activities without associated comments/blogposts/reviews and remove them

Created: 22/Apr/09 09:11 PM   Updated: 12/May/09 09:08 PM
Component/s: Walls and activities
Affects Version/s: 1.0
Fix Version/s: 1.0

Time Tracking:
Not Specified


 Description  « Hide
Look in the database for all activities that do not have an assigned object. Example (on dev):

Activity ID: 3452
Assigned comment ID: 1660

But it does not exist.

It should be one query that checks for such activities (or three queries for each activity type) and then 3 delete commands to remove such activities.

Later, when this is done, we need to check how come it was possible to delete a comment without deleting the activity and deal with such situations in the future.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Adam Zieliński added a comment - 04/May/09 09:37 PM
I checked production database and looks like there are no activities without assigned object. Close this task as 'Won't fix'?

Borys Musielak added a comment - 04/May/09 09:49 PM
Which query did you run to check that?

Adam Zieliński added a comment - 04/May/09 10:15 PM
heh I used django orm: UserActivity.objects.filter(comment__isnull=True, activity_type=UserActivity.TYPE_COMMENT)

Adam Zieliński added a comment - 04/May/09 10:34 PM
Yes yes I know i should use raw sql...

Borys Musielak added a comment - 12/May/09 05:34 PM
Sure close it if there's no issue.