Moralis Is failing

Moralis.Cloud.define(“getOfferDetails”, async (request) => {

const query = new Moralis.Query(“ArtworkForSale”);

query.select(“offerId”, “tokenId”, “tokenAddress”, “price”, “isSold”, “artwork.currentOwner”, “artwork.creator”, “artwork.cover”, “artwork.name”, “artwork.fileType”, “artwork.likes”, “artwork.active”, “artwork.royalty”, “artwork.unlockableContent”, ‘artwork.likers’);

const queryResults = await query.find({useMasterKey: true});

const results = [];

for (let i = 0; i < queryResults.length; ++i) {

results.push({

  "offerId": queryResults[i].get.offerId,

  "tokenId": queryResults[i].get.tokenId,

  "tokenAddress": queryResults[i].get.tokenAddress,

  "price": queryResults[i].get.price,

  "isSold": queryResults[i].get.isSold,

  "owner": queryResults[i].get.artwork.attributes.currentOwner,

  "creator": queryResults[i].get.artwork.attributes.creator,

  "cover": queryResults[i].get.artwork.attributes.cover,

  "name": queryResults[i].get.artwork.attributes.name,

  "fileType": queryResults[i].get.artwork.attributes.fileType,

  "likes": queryResults[i].get.artwork.attributes.likes,

  "active": queryResults[i].get.artwork.attributes.active,

  "royalty": queryResults[i].get.artwork.attributes.royalty,

  "unlockableContent": queryResults[i].get.artwork.attributes.unlockableContent,

  "likers": queryResults[i].get.artwork.attributes.likers

});

}

return results;

});

Maybe some information regarding the error you are experiencing would be helpfull to solve the problem.
But i guess you are missing:
query.include(“artwork”)