MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / switchFit

Method switchFit

service/fit.py:300–321  ·  view source on GitHub ↗
(self, fitID)

Source from the content-addressed store, hash-verified

298 return fitIDs
299
300 def switchFit(self, fitID):
301 pyfalog.debug("Switching fit to fit ID: {0}", fitID)
302 if fitID is None:
303 return None
304
305 fit = eos.db.getFit(fitID)
306
307 if self.serviceFittingOptions["useGlobalCharacter"]:
308 if fit.character != self.character:
309 fit.calculated = False
310 fit.character = self.character
311
312 if self.serviceFittingOptions["useGlobalDamagePattern"]:
313 if fit.damagePattern != self.pattern:
314 fit.calculated = False
315 fit.damagePattern = self.pattern
316
317 eos.db.commit()
318
319 if not fit.calculated:
320 self.recalc(fit)
321 self.fill(fit)
322
323 def getFit(self, fitID, projected=False, basic=False):
324 """

Callers 3

pageChangedMethod · 0.80
fitSelectedMethod · 0.80
callLaterMethod · 0.80

Calls 3

recalcMethod · 0.95
fillMethod · 0.95
getFitMethod · 0.80

Tested by

no test coverage detected