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 1 commit
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
6 changes: 6 additions & 0 deletions src/Api/Model/Languageforge/Lexicon/LexEntryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function __construct($projectModel, $id = "")
"cvPattern",
"tone",
"summaryDefinition",
"entryImportResidue",
],
false
);
Expand Down Expand Up @@ -175,6 +176,9 @@ public function __construct($projectModel, $id = "")
/** @var LexMultiText */
public $summaryDefinition;

/** @var LexMultiText */
public $entryImportResidue;

public static function mapper($databaseName)
{
/** @var LexEntryMongoMapper $instance */
Expand Down Expand Up @@ -210,6 +214,7 @@ protected function getPropertyType($name)
case "literalMeaning":
case "note": // TODO Notes need to be an array, and more capable than a multi-text. Notes have types. CP 2014-10
case "summaryDefinition":
case "entryImportResidue":
return "LexMultiText";
case "environments":
return "LexMultiValue";
Expand Down Expand Up @@ -461,6 +466,7 @@ public function calculateDifferences($otherModel)
"cvPattern",
"tone",
"summaryDefinition",
"entryImportResidue",
];
$result = [];
foreach ($properties as $property) {
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;
}