Prevents Error "Converting circular structure to JSON" while sending mod...

...els to socket

In some cases a model can have a circular structure through associations.