File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -282,15 +282,17 @@ func (f *fireflyAPI) checkAndUpdateTransaction(t structs.WhTransactionRead) erro
282
282
}
283
283
resultTransaction = updateResponse
284
284
}
285
+
286
+ if resultTransaction .Attributes .Transactions [0 ].CategoryName != "" {
287
+ log .Println (">> categories already set, not sending notification" )
288
+ return nil
289
+ }
290
+
285
291
categories , err := f .getCategories ()
286
292
if err != nil {
287
293
categories = []structs.CategoryRead {}
288
294
log .Println ("WARNING: could not retrieve category names:" , err )
289
295
}
290
- if len (categories ) > 0 {
291
- log .Println (">> categories already set, not sending notification" )
292
- return nil
293
- }
294
296
295
297
log .Println (">> Sending notification..." )
296
298
err = f .notifManager .NotifyNewTransaction (resultTransaction , f .fireflyBaseURL , categories )
You can’t perform that action at this time.
0 commit comments