LinkOrUnlinkOperation must not be done on meta operations
This commit is contained in:
parent
61e2a7505c
commit
53ecc806a7
|
@ -310,7 +310,6 @@ int KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearT
|
|||
op.checked = false;
|
||||
op.id = AddOperation(op);
|
||||
op.childs.clear();
|
||||
op._virtual = false;
|
||||
if (op.meta)
|
||||
meta[it->id] = op.id;
|
||||
|
||||
|
|
|
@ -495,6 +495,8 @@ void Database::LinkOrUnlinkOperation(User* user, Operation& op)
|
|||
bool _virtual;
|
||||
QSqlQuery query(_db);
|
||||
|
||||
if (op.meta) return;
|
||||
|
||||
account = user->GetAccount(op.account);
|
||||
|
||||
if (op.transfert)
|
||||
|
@ -533,12 +535,12 @@ void Database::LinkOrUnlinkOperation(User* user, Operation& op)
|
|||
EXECUTE_SQL_QUERY(req, );
|
||||
|
||||
// Don't need to link
|
||||
if (!query.next()) return ;
|
||||
if (!query.next()) return ;
|
||||
|
||||
set = query.record();
|
||||
set = query.record();
|
||||
|
||||
// Link
|
||||
linked.id = set.value("id").toInt();
|
||||
linked.id = set.value("id").toInt();
|
||||
|
||||
op.transfert = linked.id;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user