Fixes #4260 - Item with P582 (end time) shown as existing (#4292)

* fix issue with item with endtime shown as existing

* Removed destroyed and endtime, Added comments and also fixed the broken tests

* minor fix

* Added comments

* fix no such column location_exists error

* minor improvement

Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
Pratham Pahariya 2021-03-17 20:35:08 +05:30 committed by GitHub
parent d00127947c
commit 944225c3a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 53 additions and 28 deletions

View file

@ -10,6 +10,7 @@ SELECT
(SAMPLE(?commonsCategory) as ?commonsCategory)
(SAMPLE(?pic) as ?pic)
(SAMPLE(?destroyed) as ?destroyed)
(SAMPLE(?endTime) as ?endTime)
WHERE {
# Around given location...
SERVICE wikibase:around {
@ -31,6 +32,9 @@ SELECT
# Get (P576)
OPTIONAL { ?item wdt:P576 ?destroyed. }
# Get (P582)
OPTIONAL { ?item wdt:P582 ?endTime. }
# Get the class label in the preferred language of the user, or any other language if no label is available in that language.
OPTIONAL {
?item p:P31/ps:P31 ?classId.