You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "C:\Users\holme\Documents\Sync\Git\blitzmann\Pyfa\gui\builtinShipBrowser\sfBrowserItem.py", line 333, in OnLeftUp
btn.DoCallback()
File "C:\Users\holme\Documents\Sync\Git\blitzmann\Pyfa\gui\builtinShipBrowser\sfBrowserItem.py", line 50, in DoCallback
self.callback()
File "C:\Users\holme\Documents\Sync\Git\blitzmann\Pyfa\gui\builtinShipBrowser\fitItem.py", line 373, in deleteBtnCB
self.deleteFit()
File "C:\Users\holme\Documents\Sync\Git\blitzmann\Pyfa\gui\builtinShipBrowser\fitItem.py", line 391, in deleteFit
sFit.deleteFit(self.fitID)
File "C:\Users\holme\Documents\Sync\Git\blitzmann\Pyfa\service\fit.py", line 211, in deleteFit
if booster.boosted_fit != fit and booster.boosted_fit in eos.db.saveddata_session: # GH issue #359
File "C:\Users\holme\Documents\Sync\Git\blitzmann\Pyfa\venv\lib\site-packages\sqlalchemy\orm\session.py", line 2123, in __contains__
raise exc.UnmappedInstanceError(instance)
sqlalchemy.orm.exc.UnmappedInstanceError: Class 'builtins.NoneType' is not mapped
This has to do with this tacky code:
@staticmethod
def deleteFit(fitID):
fit = eos.db.getFit(fitID)
pyfalog.debug("Fit::deleteFit - Deleting fit: {}", fit)
# refresh any fits this fit is projected onto. Otherwise, if we have
# already loaded those fits, they will not reflect the changes
# A note on refreshFits: we collect the target fits in a set because
# if a target fit has the same fit for both projected and command,
# it will be refreshed first during the projected loop and throw an
# error during the command loop
refreshFits = set()
for projection in list(fit.projectedOnto.values()):
if projection.victim_fit != fit and projection.victim_fit in eos.db.saveddata_session: # GH issue #359
refreshFits.add(projection.victim_fit)
for booster in list(fit.boostedOnto.values()):
if booster.boosted_fit != fit and booster.boosted_fit in eos.db.saveddata_session: # GH issue #359
refreshFits.add(booster.boosted_fit)
eos.db.remove(fit)
pyfalog.debug(" Need to refresh {} fits: {}", len(refreshFits), refreshFits)
for fit in refreshFits:
eos.db.saveddata_session.refresh(fit)
eos.db.saveddata_session.commit()
I am still working on #1524 on/off, which let me to this issue. I hope to delve into it with this work, as I'm reworking a lot of old functionality. Keeping track of it here though for now, but if anyone is interested in taking a look into this, feel free to submit a PR - the deleteFit functionality is probably not going to be changing drastically from my work.
The text was updated successfully, but these errors were encountered:
This has to do with this tacky code:
I am still working on #1524 on/off, which let me to this issue. I hope to delve into it with this work, as I'm reworking a lot of old functionality. Keeping track of it here though for now, but if anyone is interested in taking a look into this, feel free to submit a PR - the
deleteFit
functionality is probably not going to be changing drastically from my work.The text was updated successfully, but these errors were encountered: