From a1f7f8f5b77fc97834d0bbb1eb85965f665f7bcb Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 13 Mar 2020 10:34:47 +0100 Subject: [PATCH] Fixed alias research --- apps/note/forms.py | 2 +- static/js/base.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/note/forms.py b/apps/note/forms.py index 933e29f5..ac6adaaf 100644 --- a/apps/note/forms.py +++ b/apps/note/forms.py @@ -6,7 +6,7 @@ from django import forms from django.utils.translation import gettext_lazy as _ from .models import Alias -from .models import Transaction, TransactionTemplate +from .models import TransactionTemplate class AliasForm(forms.ModelForm): diff --git a/static/js/base.js b/static/js/base.js index a35a5dc3..53df8329 100644 --- a/static/js/base.js +++ b/static/js/base.js @@ -46,7 +46,7 @@ function refreshBalance() { function getMatchedNotes(pattern, fun) { getJSONSync("/api/note/alias/?format=json&alias=" + pattern + "&search=user|club&ordering=normalized_name", function(aliases) { aliases.results.forEach(function(alias) { - fun(alias, alias.note); + fun(alias.note, alias); }); }); }