Add modules to session even when they were added via appendIgnoreEmpty

This commit is contained in:
DarkPhoenix
2019-10-01 10:25:31 +03:00
parent 61a33a331e
commit 0c2c0ac6ef
2 changed files with 4 additions and 2 deletions

View File

@@ -19,6 +19,7 @@
from logbook import Logger
from sqlalchemy.orm.collections import collection
pyfalog = Logger(__name__)
@@ -138,9 +139,10 @@ class HandledModuleList(HandledList):
else:
self.appendIgnoreEmpty(mod)
@collection.appender
def appendIgnoreEmpty(self, mod):
mod.position = len(self)
HandledList.append(self, mod)
super().append(mod)
if mod.isInvalid:
self.remove(mod)

View File

@@ -21,9 +21,9 @@ import datetime
import time
from copy import deepcopy
from itertools import chain
from math import asinh, log, sqrt
from logbook import Logger
from math import asinh, log, sqrt
from sqlalchemy.orm import reconstructor, validates
import eos.db