fixed: Thingy: field type includes things without fields
This commit is contained in:
parent
e862cb8303
commit
f584a12273
3 changed files with 6 additions and 2 deletions
|
|
@ -372,7 +372,9 @@ sub getEditFieldForm {
|
|||
$fieldTypes{$fieldType} = $form->getName($self->session);
|
||||
}
|
||||
|
||||
$things = $self->session->db->read('select thingId, label from Thingy_things where assetId =?',[$self->getId]);
|
||||
$things = $self->session->db->read('select thingId, Thingy_things.label, count(*) from Thingy_things '
|
||||
.'left join Thingy_fields using(thingId) where Thingy_things.assetId = ? and fieldId != "" '
|
||||
.'group by thingId',[$self->getId]);
|
||||
while (my $thing = $things->hashRef) {
|
||||
my $fieldType = "otherThing_".$thing->{thingId};
|
||||
$fieldTypes{$fieldType} = $thing->{label};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue