Can Drafts be updated via page->update()?

Is it possible to use page->update() with drafts ? I’ve been running some tests that seem to suggest it is not.

The code I am using for testing is a bit dirty, but here it is, I am running on a template:

$i = 001;
foreach ($allworks as $key => $work) {
    // Target
    echo $work->id() . '<br />';
    // Format
    $unique = str_pad(strval($i), 3, "0", STR_PAD_LEFT) . '-CS' ;
    // Echo
    echo 'Actual value: ' . $work->unique() . '<br />';
    echo 'Proposed value: ' . $unique . '<br />';
    // Update
    $work->update([
        'unique' => $unique
    ], 'es');    
    // Check
    echo 'New value: ' . $work->unique() . '<br /><br />';
    // Nullify secondary lang
    $work->update([
        'unique' => null
    ], 'en');       
    // Increment
    $i++;
    echo '$i: ' . $i . '<br /><br />'; 
}

And a test result:

Kirby\Cms\Pages Object
(
    [0] => works/test
    [1] => works/borronak
    [2] => works/draftest3
    [3] => works/drafttest2
)

works/test
Actual value: 001-CS
Proposed value: 001-CS
New value: 001-CS

$i: 2

works/borronak
Actual value: 002-CS
Proposed value: 002-CS
New value: 002-CS

$i: 3

works/draftest3
Actual value: 004-CS
Proposed value: 003-CS
New value: 004-CS

$i: 4

works/drafttest2
Actual value: 003-CS
Proposed value: 004-CS
New value: 003-CS

$i: 5

Thank you

Additionally it seems that this piece of the code, which I expected would delete the field from secondary language content file, may not be working, and that my actually be what is causing the error… since I am grabbing the field value without specifying language, right ?

    // Nullify secondary lang
    $work->update([
        'unique' => null
    ], 'en');     

So my question should change to “How to properly delete a field’s value from content file”…

… and once the real culprit is located it seems that, as suggested by @texnixe in another post, this can be fixed by doing:

// Nullify secondary lang
$work->update([
    'unique' => ''
], 'en');    

So, solved.

Thank you, you’re welcome.