bbc / nmos-query

AMWA NMOS IS-04 Query API Service
Apache License 2.0
3 stars 2 forks source link

query: fix bug when first adding a resource which matches a filter #29

Closed andrewbonney closed 5 years ago

andrewbonney commented 5 years ago

Fixes an uncaught exception relating to WebSocket subscriptions when a freshly registered resource is added.

andrewbonney commented 5 years ago

Thanks for the quick review. I'll rename those variables as I agree they're terrible. The code snippet you mention is still required as it covers the case of both variables being None rather than just one of them.

andrewbonney commented 5 years ago

@dannymeloy could you give that a re-scan and see if it makes a little more sense?

dannymeloy commented 5 years ago

If it passes all the testing then LGTM, it reads alot better now.

andrewbonney commented 5 years ago

@dannymeloy sorry, I found more bugs. Could you have another scan once the tests have passed?

dannymeloy commented 5 years ago

I can't claim to know enough about sockets to check the querysockets commit but other than that looks good to me