mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	Fix issues where rule action would use old data.
This commit is contained in:
		| @@ -22,10 +22,11 @@ declare(strict_types=1); | ||||
|  | ||||
| namespace FireflyIII\TransactionRules\Actions; | ||||
|  | ||||
| use DB; | ||||
| use FireflyIII\Models\RuleAction; | ||||
| use FireflyIII\Models\TransactionJournal; | ||||
| use Log; | ||||
| use DB; | ||||
|  | ||||
| /** | ||||
|  * Class ClearNotes. | ||||
|  */ | ||||
| @@ -46,10 +47,11 @@ class ClearNotes implements ActionInterface | ||||
|     public function actOnArray(array $journal): bool | ||||
|     { | ||||
|         DB::table('notes') | ||||
|             ->where('noteable_id', $journal['transaction_journal_id']) | ||||
|             ->where('noteable_type', TransactionJournal::class) | ||||
|             ->delete(); | ||||
|           ->where('noteable_id', $journal['transaction_journal_id']) | ||||
|           ->where('noteable_type', TransactionJournal::class) | ||||
|           ->delete(); | ||||
|         Log::debug(sprintf('RuleAction ClearNotes removed all notes.')); | ||||
|  | ||||
|         return true; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user