Ladsgroup has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/401827 )
Change subject: Update model version when model lookup can't find the model
......................................................................
Update model version when model lookup can't find the model
Bug: T184127
Change-Id: Ifc8defbba602c76bd926ca4e43c82ef62816e52c
---
M includes/ScoreFetcher.php
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES
refs/changes/27/401827/1
diff --git a/includes/ScoreFetcher.php b/includes/ScoreFetcher.php
index 4d3d8b3..1fbd843 100644
--- a/includes/ScoreFetcher.php
+++ b/includes/ScoreFetcher.php
@@ -16,6 +16,7 @@
namespace ORES;
+use InvalidArgumentException;
use MediaWiki\MediaWikiServices;
use WebRequest;
@@ -89,7 +90,12 @@
}
$modelLookup = MediaWikiServices::getInstance()->getService(
'ORESModelLookup' );
- $storageVersion = $modelLookup->getModelVersion( $model );
+ try {
+ $storageVersion = $modelLookup->getModelVersion( $model
);
+ } catch ( InvalidArgumentException $exception ) {
+ $storageVersion = null;
+ }
+
$responseVersion = $modelOutputs['version'];
if ( $storageVersion === $responseVersion ) {
--
To view, visit https://gerrit.wikimedia.org/r/401827
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc8defbba602c76bd926ca4e43c82ef62816e52c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits