marvin icon indicating copy to clipboard operation
marvin copied to clipboard

cube.getMaps requires explicit mode call to match original cube.mode

Open havok2063 opened this issue 6 years ago • 1 comments

Describe the bug Attempted to get a remote Maps from a remote Cube and it crashed looking it up my db. It works when I explicitly pass a mode into getMaps. It seems regardless of the Cube mode=remote, the Maps call still uses mode=auto. Is this the expected behaviour?

To Reproduce

  1. With DB on, in master branch
  2. Get a remote cube cube = Cube('8937-12705', mode='remote') Cube has mode='remote' and data-origin='api'
  3. Try to get a maps maps = cube.getMaps(). This fails as it tries to look up the cube in my local db.
  4. This works. maps=cube.getMaps(mode='remote')

Expected behavior A Maps to be retrieved respecting the original cube.mode. Should getXXX methods use the mode of the original object automatically?

Additional context This may not be a bug. With my DB turned off, it behaves normally. This has vague recollections of an old Issue (that may have been resolved) but I couldn't find it.

havok2063 avatar Aug 27 '18 17:08 havok2063

This is the expected behaviour, but maybe not the desired one. I see advantages and disadvantages to this, but given that most people won't have a DB it makes some sense to me to keep the auto mode to maximise the use of local resources. I'm going to add this to Marvin 3.0 so that we can make a decision then.

albireox avatar Nov 12 '18 18:11 albireox