python-o365 icon indicating copy to clipboard operation
python-o365 copied to clipboard

`Drive.get_item_by_path` does not initiate `_parent` attribute

Open MattSom opened this issue 4 years ago • 2 comments

Folder.upload_file returns a File object (DriveItem) which has a _parent attribute loaded with the Folder object. However after you get this item by its path on the drive with Drive.get_item_by_path, this connection is not getting initialized, _parent field is None.

All in all directory handling logic is missing from this repository. The models are quite smart only there's a lot of practically needed functionality which is missing. I had to implement them in my layer, while they should have been this repo's job.

MattSom avatar Jun 09 '21 13:06 MattSom

Yes, a lot of work could (and should) have been done to improve this library... but as hard as it sounds to you that requires time and effort which I don't have.

If you need something, instead of complaining, just submit PR.

alejcas avatar Jun 24 '21 08:06 alejcas

If you need something, instead of complaining, just submit PR.

It is called feedback.

Edit: Anyway my solution is not appropriate/clean enough to submit as a PR since the work is done by wrapping the whole thing into another layer using the available methods. When I get the time I'll take a look how could this work in the library layer.

MattSom avatar Jun 24 '21 09:06 MattSom