
from framework.mongo import database


def main():

    database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)

    print('-----\nDone.')

if __name__ == '__main__':
    main()

from framework.mongo import database


def main():

    database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
    database['node'].update({"is_dashboard": {'$exists': False}}, {'$set': {'is_dashboard': False}}, multi=True)
    database['node'].update({"expanded": {'$exists': False}}, {'$set': {'expanded': False}}, multi=True)

    print('-----\nDone.')

if __name__ == '__main__':
    main()

Update migration to ensure node's have is_dashboard and expanded fields
Update migration to ensure node's have is_dashboard and expanded fields

  
  from framework.mongo import database
  
  
  def main():
  
      database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
+     database['node'].update({"is_dashboard": {'$exists': False}}, {'$set': {'is_dashboard': False}}, multi=True)
+     database['node'].update({"expanded": {'$exists': False}}, {'$set': {'expanded': False}}, multi=True)
  
      print('-----\nDone.')
  
  if __name__ == '__main__':
      main()
+ 
Update migration to ensure node's have is_dashboard and expanded fields
## Code Before:

from framework.mongo import database


def main():

    database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)

    print('-----\nDone.')

if __name__ == '__main__':
    main()
## Instruction:
Update migration to ensure node's have is_dashboard and expanded fields
## Code After:

from framework.mongo import database


def main():

    database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
    database['node'].update({"is_dashboard": {'$exists': False}}, {'$set': {'is_dashboard': False}}, multi=True)
    database['node'].update({"expanded": {'$exists': False}}, {'$set': {'expanded': False}}, multi=True)

    print('-----\nDone.')

if __name__ == '__main__':
    main()
