mark article as to be deleted (since we have only ad-hoc articles)

This commit is contained in:
Martin Brodbeck 2018-07-13 14:16:16 +02:00
parent 372937e096
commit 2d93da5cc2
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,8 @@ void Sale::removeArticle(const Article* articlePtr)
[&articlePtr](auto art) { return art.get() == articlePtr; });
if (it != articles_.end()) {
(*it)->setSale(nullptr);
(*it)->setState(
Article::State::DELETE); // since we only have ad-hoc articles, that have all been sold
articles_.erase(it);
}
}