MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / getModPosition

Method getModPosition

eos/saveddata/module.py:235–245  ·  view source on GitHub ↗
(self, fit=None)

Source from the content-addressed store, hash-verified

233 return self.getModPosition()
234
235 def getModPosition(self, fit=None):
236 # Pass in fit for reliability. When it's not passed, we rely on owner and owner
237 # is set by sqlalchemy during flush
238 fit = fit if fit is not None else self.owner
239 if fit:
240 container = fit.projectedModules if self.isProjected else fit.modules
241 try:
242 return container.index(self)
243 except ValueError:
244 return None
245 return None
246
247 @property
248 def isProjected(self):

Callers 2

modPositionMethod · 0.95
__fitRestrictionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected