anvilistas / anvil-labs

MIT License
9 stars 3 forks source link

fix service worker portable classes #106

Closed s-cork closed 1 year ago

s-cork commented 1 year ago

problem before - the decorator wasn't returning the cls 🤦

But I think this should mostly work i.e. making something portable will actually register it with kompot

But I think all portable classes will need to be registered with kompot from the server perspective So yeah

doing kompot.register(cls) will likely be necessary anyway

s-cork commented 1 year ago

Adjusted the PR to just make anvil.server.portable_class actually return the class

This means that things should be explicitly registered with kompot @kompot.register should work fine as an additional decorator on a portable classes