Sync Address using Interface results in duplicate collection entries

Whenever I add an address to sync using the server interface, that address gets populated twice into the collection.

Only cloud function on the server is this

  anonymous:3500, authenticated:3500, windowMs:60000

Moralis.Cloud.afterSave("WatchedEthAddress", async (request) => {
    const logger = Moralis.Cloud.getLogger();
 	const address = request.object.get("address");"afterSave triggered for address " + address);
    const options = { chain: "eth", address: address};
	const {balance} = await Moralis.Web3API.account.getNativeBalance(options);
  	const ethBalance = Moralis.Cloud.units({
		method: "fromWei",
		value: balance
	});"afterSave balance response " + ethBalance);
	request.object.set("eth_balance", ethBalance);

What you mean by getting populated twice?

When I enter the address in the plugin, hit save. in the WatchedEthAddresses it shows up twice then.

That means only that a row is saved twice.
That could happen once when it is added and once when it is updated.

yes but I dont want a row to be saved twice. It is running the cloud function and ends up beeing saved twice.

I don’t think that you can count on that happening. You could check a timestamp for example and not run the code again if it didn’t pass x minutes for that address.

but shouldnt the sync / watch address function only save 1 record intothe table as it does so by default as well?

I would not expect that to happen. There could be an initial save and then additional update in order to update various fields. You can not count on how many saves are done initially.