mirror of
				https://gitlab.crans.org/bde/nk20-scripts
				synced 2025-10-31 15:09:59 +01:00 
			
		
		
		
	In the force delete script, delete transactions transaction by transaction
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
		| @@ -78,11 +78,11 @@ class Command(BaseCommand): | ||||
|                     # Deleting transactions | ||||
|                     transactions = Transaction.objects.filter(Q(source=user.note) | Q(destination=user.note)).all() | ||||
|                     local_deleted += list(transactions) | ||||
|                     if kwargs['verbosity'] >= 1: | ||||
|                         for tr in transactions: | ||||
|                     for tr in transactions: | ||||
|                         if kwargs['verbosity'] >= 1: | ||||
|                             self.stdout.write(f"Removing {tr}...") | ||||
|                     if force: | ||||
|                         transactions.delete() | ||||
|                         if force: | ||||
|                             tr.delete() | ||||
|  | ||||
|                     # Deleting memberships | ||||
|                     memberships = user.memberships.all() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user