Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicolas Frandeboeuf
kresus
Commits
cb2a2687
Commit
cb2a2687
authored
May 05, 2017
by
ZeHiro
Browse files
Deleting IBAN of accounts for which the imported value was None. Fixes #378
parent
118c675e
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/models/migrations.js
View file @
cb2a2687
...
...
@@ -344,6 +344,20 @@ let migrations = [
}
catch
(
e
)
{
log
.
error
(
`Error while migrating s2e accesses:
${
e
.
toString
()}
`
);
}
},
async
function
m12
()
{
log
.
info
(
'
Searching accounts with IBAN value set to None
'
);
try
{
let
accounts
=
await
Account
.
all
();
for
(
let
account
of
accounts
.
filter
(
acc
=>
acc
.
iban
===
'
None
'
))
{
log
.
info
(
`\tDeleting iban for
${
account
.
title
}
of bank
${
account
.
bank
}
`
);
delete
account
.
iban
;
await
account
.
save
();
}
}
catch
(
e
)
{
log
.
error
(
`Error while deleting iban with None value:
${
e
.
toString
()}
`
);
}
}
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment