Remove digital object if there are no properties added.

Add tests for this.
1 job for master in 2 minutes and 44 seconds