put deck fix messages in the collection log
This commit is contained in:
parent
9fc4b55575
commit
ce4d18aded
@ -455,13 +455,13 @@ class DeckManager:
|
||||
for deck in decks:
|
||||
# two decks with the same name?
|
||||
if deck['name'] in names:
|
||||
print("fix duplicate deck name", deck['name'].encode("utf8"))
|
||||
self.col.log("fix duplicate deck name", deck['name'])
|
||||
deck['name'] += "%d" % intTime(1000)
|
||||
self.save(deck)
|
||||
|
||||
# ensure no sections are blank
|
||||
if not all(deck['name'].split("::")):
|
||||
print("fix deck with missing sections", deck['name'].encode("utf8"))
|
||||
self.col.log("fix deck with missing sections", deck['name'])
|
||||
deck['name'] = "recovered%d" % intTime(1000)
|
||||
self.save(deck)
|
||||
|
||||
@ -469,7 +469,7 @@ class DeckManager:
|
||||
if "::" in deck['name']:
|
||||
immediateParent = "::".join(deck['name'].split("::")[:-1])
|
||||
if immediateParent not in names:
|
||||
print("fix deck with missing parent", deck['name'].encode("utf8"))
|
||||
self.col.log("fix deck with missing parent", deck['name'])
|
||||
self._ensureParents(deck['name'])
|
||||
names.add(immediateParent)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user