learning-unlimited/ESP-Website — comment on commit 5e40a31a7502caef1c20235f2eaf94e1e33c368d
File: esp/esp/qsd/seltests.py line 40
By gkanwar:

So I managed to make this work. I just don't know why it does.... Also it's clearly not the correct way, so I would like to figure this out still. My code for this bit is now:

```
# Make Q/Web public
try:
#stdout.write(str(GetNode('Q/Web').id) + "\n")
stdout.write(str(len(UserBit.objects.filter(user = None, verb = GetNode('V/Flags/Public'), qsc = GetNode('Q/Web'), recursive = True))) + "\n")
ub = UserBit(user = None, verb = GetNode('V/Flags/Public'), qsc = GetNode('Q/Web'), recursive = True)
stdout.write("UserBit created, not saved\n")
ub.save()
stdout.write("In the try\n")
except:
pass
stdout.write("In the except\n")
#UserBit.objects.create(user = None, verb = GetNode('V/Flags/Public'), qsc = GetNode('Q/Web'), recursive = True)
#stdout.write(str(GetNode('Q/Web')) + "\n")
#stdout.write(str(GetNode('Q/Web')) + "\n")
```