Any person who brings an action to enforce a lien provided for in this chapter, or any person having a lien as provided for in this chapter, who is made a party to any such action, has a right to demand that such lien be enforced against the whole or any part of the property.