Commit 841cc25e authored by Angry Dan's avatar Angry Dan Committed by amitaibu

Issue #2143733 by czigor, Angry Dan, dobe: EntityMalformedException with...

Issue #2143733 by czigor, Angry Dan, dobe: EntityMalformedException with select og_audience widget if group content has no other fields
parent 3632a4a6
......@@ -709,6 +709,10 @@ function og_field_delete_instance($instance) {
function og_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
list(,, $bundle) = entity_extract_ids($entity_type, $entity);
if (!isset($form['#entity'])) {
$form['#entity'] = $entity;
}
if (og_get_group_audience_fields($entity_type, $bundle)) {
$form['#validate'][] = 'og_form_group_reference_validate';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment