Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken fields #1718

Merged
merged 4 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ build:
npm install

# ensure we start with a clean ui-dist volume for every build
docker volume rm web-languageforge_lf-ui-dist 2>/dev/null
-docker volume rm web-languageforge_lf-ui-dist 2>/dev/null

docker compose build mail app lfmerge ld-api next-proxy next-app

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Model/Languageforge/Lexicon/LexSense.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function getPropertyType(string $name)
case "anthropologyCategories":
return "LexMultiValue";
case "status":
return "LexMultiValue";
return "LexValue";
default:
return "string";
}
Expand Down Expand Up @@ -544,6 +544,6 @@ public function differences(LexSense $otherSense, string $thisSenseId, string $o
/** @var LexMultiText */
public $senseImportResidue;

/** @var LexMultiValue */
/** @var LexValue */
public $status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function testLiftImportMerge_FlexAllFields_HasAllFields()
$this->assertEquals(LexMultiValue::createFromArray(["901"]), $sense00->anthropologyCategories);
$this->assertEquals(LexMultiValue::createFromArray(["applied linguistics"]), $sense00->academicDomains);
$this->assertEquals(new LexValue("primary"), $sense00->senseType);
$this->assertEquals(LexMultiValue::createFromArray(["Tentative"]), $sense00->status);
$this->assertEquals(new LexValue("Tentative"), $sense00->status);
$this->assertEquals(LexMultiValue::createFromArray(["colloquial"]), $sense00->usages);

$expected = new LexPicture("Desert.jpg", $sense00->pictures[0]->guid);
Expand Down
2 changes: 1 addition & 1 deletion test/php/model/languageforge/lexicon/LexSenseModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public function testGetProperties_ConstructsCorrectTypes()
$this->assertInstanceOf(LexValue::class, $sense->senseType);
$this->assertInstanceOf(LexMultiValue::class, $sense->academicDomains);
$this->assertInstanceOf(LexMultiValue::class, $sense->anthropologyCategories);
$this->assertInstanceOf(LexMultiValue::class, $sense->status);
$this->assertInstanceOf(LexValue::class, $sense->status);
}
}