Fixed AttributeError on edit portlets