Skip to content

Commit ee5a6b2

Browse files
committed
Merge pull request #1936 from zlamalp/facility
CORE: Fixed getting facility by attribute value
1 parent c9b6729 commit ee5a6b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

perun-core/src/main/java/cz/metacentrum/perun/core/blImpl/FacilitiesManagerBlImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.Set;
99
import java.util.concurrent.atomic.AtomicBoolean;
1010

11+
import cz.metacentrum.perun.core.api.BeansUtils;
1112
import org.slf4j.Logger;
1213
import org.slf4j.LoggerFactory;
1314

@@ -419,7 +420,7 @@ public List<Facility> getFacilitiesByAttribute(PerunSession sess, String attribu
419420
throw new InternalErrorException("Attribute " + attributeName + " is large attribute, which is not supported.");
420421
}
421422
Attribute attribute = new Attribute(attributeDef);
422-
attribute.setValue(attributeValue);
423+
attribute.setValue(BeansUtils.stringToAttributeValue(attributeValue, attribute.getType()));
423424
getPerunBl().getAttributesManagerBl().checkNamespace(sess, attribute, AttributesManager.NS_FACILITY_ATTR);
424425
if (!(getPerunBl().getAttributesManagerBl().isDefAttribute(sess, attribute) || getPerunBl().getAttributesManagerBl().isOptAttribute(sess, attribute)))
425426
throw new WrongAttributeAssignmentException("This method can process only def and opt attributes");

0 commit comments

Comments
 (0)