@@ -92,8 +92,8 @@ def delete_team(object_id, continuous=True, **kwargs):
9292def delete_project (object_id , continuous = True , ** kwargs ):
9393 from sentry .models import (
9494 Project , ProjectKey , ProjectStatus , TagKey , TagValue , GroupTagKey ,
95- GroupTagValue , Activity , EventMapping , Group , GroupRuleStatus ,
96- GroupHash , GroupSeen ,
95+ GroupTagValue , Activity , EventMapping , Group , GroupEmailThread ,
96+ GroupMeta , GroupRuleStatus , GroupHash , GroupSeen , UserReport
9797 )
9898
9999 try :
@@ -111,7 +111,8 @@ def delete_project(object_id, continuous=True, **kwargs):
111111 # XXX: remove keys first to prevent additional data from flowing in
112112 model_list = (
113113 ProjectKey , TagKey , TagValue , GroupTagKey , GroupTagValue , EventMapping ,
114- Activity , GroupRuleStatus , GroupHash , GroupSeen ,
114+ Activity , GroupRuleStatus , GroupHash , GroupSeen , GroupMeta , UserReport ,
115+ GroupEmailThread
115116 )
116117 for model in model_list :
117118 has_more = bulk_delete_objects (model , project_id = p .id , logger = logger )
@@ -141,8 +142,8 @@ def delete_project(object_id, continuous=True, **kwargs):
141142@retry
142143def delete_group (object_id , continuous = True , ** kwargs ):
143144 from sentry .models import (
144- EventMapping , Group , GroupHash , GroupRuleStatus , GroupStatus ,
145- GroupTagKey , GroupTagValue , GroupEmailThread ,
145+ EventMapping , Group , GroupHash , GroupMeta , GroupRuleStatus , GroupStatus ,
146+ GroupTagKey , GroupTagValue , GroupEmailThread , UserReport
146147 )
147148
148149 try :
@@ -154,8 +155,8 @@ def delete_group(object_id, continuous=True, **kwargs):
154155 group .update (status = GroupStatus .DELETION_IN_PROGRESS )
155156
156157 bulk_model_list = (
157- GroupHash , GroupRuleStatus , GroupTagValue , GroupTagKey ,
158- EventMapping , GroupEmailThread ,
158+ GroupHash , GroupMeta , GroupRuleStatus , GroupTagValue , GroupTagKey ,
159+ EventMapping , GroupEmailThread , UserReport
159160 )
160161 for model in bulk_model_list :
161162 has_more = bulk_delete_objects (model , group_id = object_id , logger = logger )
0 commit comments