FuelRats / pipsqueak

ED Fuel rats IRC bot
Other
13 stars 14 forks source link

Fix annoying (and stuff-breaking) typo in RescueBoard.find #261

Closed MHajoha closed 6 years ago

MHajoha commented 6 years ago

Fix a typo in RescueBoard.find that caused it to return FindRescueResult(rescue=(the_rescue_were_looking_for, ), created=False) instead of FindRescueResult(rescue=the_rescue_were_looking_for, created=False) when presented with a database id. This causes the parameters rRfF to not work with ids (giving you a tuple instead of a Rescue object), producing the following ugly error:

<MHajoha> !clear @51d141a7-da74-4811-83a7-ba65be379ef9
<&DrillSqueak[BOT]> AttributeError: 'tuple' object has no attribute 'platform' (file "sopel-modules/rat-board.py", line 851, in func_clear)

Fixing this should allow commands with those parameters to correctly accept ids.

MHajoha commented 6 years ago

Almost never I guess. I just noticed this when I was toying around with MECHA-237

MHajoha commented 6 years ago

So, can I trouble you to merge this now? It's been a while. The find command thing is approved as well ;)