Commit ab729680 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ed46529d
......@@ -102,7 +102,7 @@ type ZRawObject struct { // keep in sync with zodb(test).ZRawObject
// ZPyCommitRaw commits new transaction into database @ zurl with raw data specified by objv.
//
// Empty data means "delete object".
// Nil data means "delete object".
// The commit is performed via zodbtools/py.
func ZPyCommitRaw(zurl string, at zodb.Tid, objv ...ZRawObject) (_ zodb.Tid, err error) {
defer xerr.Contextf(&err, "%s: zpycommit @%s", zurl, at)
......@@ -114,7 +114,7 @@ func ZPyCommitRaw(zurl string, at zodb.Tid, objv ...ZRawObject) (_ zodb.Tid, err
fmt.Fprintf(zin, "extension %q\n", "")
for _, obj := range objv {
// !data -> delete
if len(obj.Data) == 0 {
if obj.Data == nil {
fmt.Fprintf(zin, "obj %s delete\n", obj.Oid)
} else {
fmt.Fprintf(zin, "obj %s %d null:00\n", obj.Oid, len(obj.Data))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment