mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-10-31 15:50:03 +01:00 
			
		
		
		
	Remove test code
This commit is contained in:
		| @@ -218,26 +218,18 @@ class Transaction(PolymorphicModel): | ||||
|                 # When source == destination, no money is transferred and no transaction is created | ||||
|                 return | ||||
|  | ||||
|             self.log("Saving") | ||||
|             # We save first the transaction, in case of the user has no right to transfer money | ||||
|             super().save(*args, **kwargs) | ||||
|             self.log("Saved") | ||||
|  | ||||
|             # Save notes | ||||
|             self.source.refresh_from_db() | ||||
|             self.source.balance += diff_source | ||||
|             self.source._force_save = True | ||||
|             self.source.save() | ||||
|             self.log("Source saved") | ||||
|             self.destination.refresh_from_db() | ||||
|             self.destination.balance += diff_dest | ||||
|             self.destination._force_save = True | ||||
|             self.destination.save() | ||||
|             self.log("Destination saved") | ||||
|  | ||||
|     def log(self, msg): | ||||
|         with open("/tmp/log", "a") as f: | ||||
|             f.write(msg + "\n") | ||||
|  | ||||
|     def delete(self, **kwargs): | ||||
|         """ | ||||
|   | ||||
| @@ -65,8 +65,6 @@ class InstancedPermission: | ||||
|                     obj._force_delete = True | ||||
|                     Model.delete(obj) | ||||
|  | ||||
|                 with open("/tmp/log", "w") as f: | ||||
|                     f.write(str(obj) + ", " + str(obj.pk) + ", " + str(self.model.model_class().objects.filter(pk=0).exists())) | ||||
|                 return ret | ||||
|  | ||||
|         if permission_type == self.type: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user