Populates an object with the form's data

def populate_obj(self, obj=None, form=None):
        """Populates an object with the form's data
        """
        if not form:
            form = current_context.data.form
        if obj is None:
            obj = AttrDict()
        form.populate_obj(obj)
        return obj