ItEr60S04ValidacionEProbasFuncionaisItEr59S04 : Fixing bug in the unit type class.
it shows the error messages when the importation is incorrect.
This commit is contained in:
parent
ca57ad2b2d
commit
6ce60c81f4
2 changed files with 14 additions and 0 deletions
|
|
@ -92,6 +92,10 @@ public class UnitType extends IntegrationEntity{
|
|||
|
||||
@AssertTrue(message = "the measure unit type has to be unique. It is already used")
|
||||
public boolean checkConstraintUniqueName() {
|
||||
if (StringUtils.isBlank(measure)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean result;
|
||||
if (isNewObject()) {
|
||||
result = !existsUnitTypeWithTheName();
|
||||
|
|
|
|||
|
|
@ -8,4 +8,14 @@
|
|||
<unit-type measure="m2" code="000-006" />
|
||||
<unit-type measure="m3" code="000-007" />
|
||||
<unit-type measure="tn" code="000-008" />
|
||||
|
||||
<!-- code repeated -->
|
||||
<unit-type measure="m1" code="000-001" />
|
||||
<!-- without code -->
|
||||
<unit-type measure="m2" />
|
||||
<!-- measure repeated -->
|
||||
<unit-type measure="units" code="000-009" />
|
||||
<!-- without measure -->
|
||||
<unit-type code="000-010" />
|
||||
|
||||
</unit-type-list>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue