Index: branches/rewrite/pywikibot/site.py |
— | — | @@ -3443,7 +3443,7 @@ |
3444 | 3444 | Sets the claim target to whatever claim.target is |
3445 | 3445 | An optional snaktype lets you set a novalue or somevalue. |
3446 | 3446 | """ |
3447 | | - if claim.isReference: |
| 3447 | + if claim.isReference or claim.isQualifier: |
3448 | 3448 | raise NotImplementedError |
3449 | 3449 | if not claim.snak: |
3450 | 3450 | #We need to already have the snak value |
— | — | @@ -3458,10 +3458,7 @@ |
3459 | 3459 | if snaktype == 'value': |
3460 | 3460 | params['value'] = json.dumps(claim._formatDataValue()) |
3461 | 3461 | |
3462 | | - for arg in kwargs: |
3463 | | - #TODO: Get the lastrevid from the item |
3464 | | - if arg in ['bot','lastrevid']: |
3465 | | - params[arg] = kwargs[arg] |
| 3462 | + params['lastrevid'] = claim.on_item.lastrevid |
3466 | 3463 | req = api.Request(site=self, **params) |
3467 | 3464 | data = req.submit() |
3468 | 3465 | return data |